If a new billing address is also used for shipping (the corresponding checkbox is set) Magento of course creates a record in sales_flat_order_address for each.

Is there any reason why customer_address_id field which keeps the reference to customer/address entity is only saved for billing address while shipping remains NULL?

Note: The issue can be reproduced only for inserting a new address during the checkout. For existing addresses it puts references for both. Which is even more strange.

Note2: you can observe this behavior in sales_flat_order_address and sales_flat_quote_address.

  • is the value set for both on sales_flat_quote_address? – David Manners May 28 '14 at 16:22
  • @DavidManners maybe I didn't made it clear but the question IS about customer_address_id field of sales_flat_quote_address table. – user487772 May 29 '14 at 5:05
  • Opps sorry yeah miss read that :) – David Manners May 29 '14 at 7:19
  • I was only able to get this if I selected save in address book only for the billing address, if I set both to save then both are setup correctly :( – David Manners Jul 23 '14 at 13:28
  • @TimBezhashvyly if it is not about sales_flat_order_address, maybe you should update the description – Flyingmana Feb 12 '15 at 12:14

I believe this is not true, at least in EE 1.13:

enter image description here

|improve this answer|||||
  • I believe you made your order using existing address. – user487772 Jun 4 '14 at 13:05

When users purchase products in the store and have different Shipping address from the Billing addresses, the Billing address information is not being stored with the order. This is a big issue as many users are purchasing orders to be shipped to different addresses. When the order is completed, the confirmation email shows the separate Ship To and Bill To addresses but when you log into the store (as Store Admin) you see the Shipping information in both the billing and the shipping addresses.

|improve this answer|||||

When saving an address, you have to to make sure it is 'saved to the customer address book'. There is a small checkbox on the template for this to occur. This will cause the shipping customer_address_id to be populated. I can only assume this is to allow storage of one-time-entry of the shipping address for people who want to ship to somewhere other than the billing address. I don't know why varien decided to build it this way, but they did.

|improve this answer|||||

The reason has to do with the duplication of the Shipping method and that the customer address is not existent initially. And during the whole logic to identify "sameAsBilling" they have a step which prevents the Shipping Address to get saved into the Address book, to avoid saving two identically Addresses there. On some place there they seem to forget to apply the new generated address ID to the Shipping address after the save process.

I assume its not a high issue, as it does not break actual logic of Magento here.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.