I need to know more on the back end flow, when a user adds an item to cart as a guest and the logs in using his valid credentials. The orderId created for the guest gets migrated to the registered user's id. Could someone please explain how this is handled ? Details of the commands and DB tables would be helpful.
I did read about a MigrateUserEntries Command but I am not sure if that is the correct one.
Thanks in advance.
When a guest user logs in, his cart gets merged with the cart of the registered user account.
This impacts the tables related to order and order items.
You can look at the documentation of OrderCopy for more details.