Question about "Use authenticated user as customer" #1058
Closed
de-raaf-media
started this conversation in
Feature Requests
Replies: 1 comment 2 replies
-
The logged in user will remain as the customer set on the order. Even if you update the customer information (like their email), it'll update the email of that existing user. Now, I think of it, sounds like this feature might have quite a few edge cases I didn't consider. I may end up removing it 🤔 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In your commit I see
// When the customer driver is set to users, a user is logged in, and the cart doesn't have a customer,
// we'll set the customer to the logged in user.
What happens (or what should happen) if the user was logged in when adding items to the cart decides to logout to continue as a guest user. I think currently the customer_id will remain attached to the order? Also if the user has another account (edge case?) and logs in with that, the customer_id will remain the same.
First I thought of destroying the cart on logout (still an option) but that doesn't seem how it is generally handled in webshops. Maybe on logout clear the customer_id for the current order? And if you log in with another account update the customer_id to the new user id?
Beta Was this translation helpful? Give feedback.
All reactions