Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Checkout
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2017 at 14:11 UTC
Updated:
26 Jul 2017 at 21:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
berdirComment #3
sumanthkumarc commentedAdded Related issue and also should we call setCustomer() in orderRefresh?? otherwise the above solution might not help with the related issue.
Comment #4
mglamansumanthkumarc, so you're suggesting that on order refresh we check if the order has a customer. If it does, then always sync that address. Which fixes issues if an order is re-assigned.
Comment #5
mglamanHere is my fix. Instead of running
setEmailthe logic to set the order email to the customer's (if order email empty) out of theisNewcheck. This fixes the issue for all anonymous orders that convert to an authenticated user due to login at checkout, or registration.I feel #2873526: Updating email in user account, doesn't update email in order (cart) mail property requires a different fix. Where on user save if the email has changed any related carts are updated.
The PR https://github.com/drupalcommerce/commerce/pull/727 has two commits: one with the failing test to prove what Berdir reported, and a second to provide the fix.
EDIT:
The real bug seems to be the register pane form. When a user is logged in we run the following in order assignment:
However, I think the proposed fix will help catch any of these type of accidents where someone implementing forgets to explicitly set the order email after setting the customer. Especially when using
setCustomerId.Comment #7
bojanz commentedThis PR landed while I was on vacation, and I completely overlooked it. Sorry about that.