- Posts: 431
- Thank you received: 22
Billing and shipping address id
3 years 10 months ago #346865
by mojweb
Billing and shipping address id was created by mojweb
-- HikaShop version -- : 4.4.5
We use massaction csv export for orders. In massaction export I get billing_address_user_id and shipping_address_user_id. Those should be diferent if customer enters diferent shipping address. But they are the same ids.
We use massaction csv export for orders. In massaction export I get billing_address_user_id and shipping_address_user_id. Those should be diferent if customer enters diferent shipping address. But they are the same ids.
Please Log in or Create an account to join the conversation.
3 years 10 months ago #346869
by nicolas
Replied by nicolas on topic Billing and shipping address id
Hi,
No. These are the user_id attached to each address. And thus, it's normal they are always the same for one order since an order is linked to one user only.
If you want the id of the shipping / billing address, they are in billing_address_id and shipping_address_id, but you also have them in order_shipping_address_id and order_billing_address_id.
No. These are the user_id attached to each address. And thus, it's normal they are always the same for one order since an order is linked to one user only.
If you want the id of the shipping / billing address, they are in billing_address_id and shipping_address_id, but you also have them in order_shipping_address_id and order_billing_address_id.
Please Log in or Create an account to join the conversation.
3 years 10 months ago #346907
by mojweb
Replied by mojweb on topic Billing and shipping address id
OK, but billing_address_id and shipping_address_id are always diferent. I understand, its ID, but how we can know when billing address is diferent from shipping address?
We use csv file to import in accounting app.
We use csv file to import in accounting app.
Please Log in or Create an account to join the conversation.
3 years 10 months ago #346910
by nicolas
Replied by nicolas on topic Billing and shipping address id
It's normal they are different.
In HikaShop a user has two sets of addresses. One set with the type "billing" and one set with the type "shipping".
When the user check the checkbox "use the billing address as shipping address", the system will create a copy of the billing address with the type "shipping".
So you should actually never have a billing address and a shipping address with the same id.
In short, you can't base yourself on the id to know if they are the same or not. You'll have to compare each field of both address to see if they are the same or not.
In HikaShop a user has two sets of addresses. One set with the type "billing" and one set with the type "shipping".
When the user check the checkbox "use the billing address as shipping address", the system will create a copy of the billing address with the type "shipping".
So you should actually never have a billing address and a shipping address with the same id.
In short, you can't base yourself on the id to know if they are the same or not. You'll have to compare each field of both address to see if they are the same or not.
Please Log in or Create an account to join the conversation.
3 years 9 months ago #346974
by mojweb
Replied by mojweb on topic Billing and shipping address id
With your logic, our app cant check if adreess is the same or diferent, by ID? So we must compare every customer adress by ALL data to verify if it is diferent or the same?
And if there is returning customer, the problem is multiplying.
And if there is returning customer, the problem is multiplying.
Please Log in or Create an account to join the conversation.
3 years 9 months ago #346977
by nicolas
Replied by nicolas on topic Billing and shipping address id
Well, you can check if the billing address is the same as the old billing address.
But even then, it would be possible the customer just create a new address with the same values.
If you really whant to check if an address is the same than another, I don't see another way than checking each field individually.
But even then, it would be possible the customer just create a new address with the same values.
If you really whant to check if an address is the same than another, I don't see another way than checking each field individually.
Please Log in or Create an account to join the conversation.
3 years 9 months ago #347083
by mojweb
Replied by mojweb on topic Billing and shipping address id
Just for info. If using registration at checkout, is logic the same?
So returning users/customers have endless "diferent" addresses?
So returning users/customers have endless "diferent" addresses?
Please Log in or Create an account to join the conversation.
3 years 9 months ago #347086
by nicolas
Replied by nicolas on topic Billing and shipping address id
Hi,
If you register the billing address you enter will have one id, and its copy as shipping address will have another id. It will be the same ids in the order.
If you come back later on, and login and proceed to a payment without changing your billing/shipping addresses, they will have the same ids too.
However, if you modify an address, then the system will automatically unpublish the original address (so that it can still be attached to the old order you made in the past), and the modified address will have a new id.
If you do a guest checkout, then even if you use a the same addresses each time (you will have to re-enter them each time), the addresses will have different ids each time.
If you register the billing address you enter will have one id, and its copy as shipping address will have another id. It will be the same ids in the order.
If you come back later on, and login and proceed to a payment without changing your billing/shipping addresses, they will have the same ids too.
However, if you modify an address, then the system will automatically unpublish the original address (so that it can still be attached to the old order you made in the past), and the modified address will have a new id.
If you do a guest checkout, then even if you use a the same addresses each time (you will have to re-enter them each time), the addresses will have different ids each time.
Please Log in or Create an account to join the conversation.
Time to create page: 0.249 seconds