How to add items to the shopping cart when not logged in, and retain the items in the shopping cart after logging in.
How to determine whether the user who added the shopping cart before logging in and the user who retained the shopping cart after logging in are the same user?
This has nothing to do with any framework. You can save the data added to the shopping cart when you are not logged in, and just merge the data directly after logging in. As for how to determine whether it is the same user, I know that there is a plug-in for js that can generate data based on the browser and device. A unique identifier, the others are unknown
IP address
My understanding is that adding a shopping cart means adding a session, and logging in also adds a session, so it should not matter if you are logged in or not.