tp3.2 implements adding to shopping cart without login
TAO
TAO 2018-06-21 13:28:23
0
5
1689

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?

TAO
TAO

Bystander

reply all(3)
捂耳听风。

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

  • reply Okay, thank you. What plug-in is it? I just don’t know how to determine whether the products put into the shopping cart before logging in are the same user after logging in.
    TAO author 2018-06-28 10:17:28
apologize

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.

  • reply What I mean is that users can add items to the shopping cart even if they are not logged in. After logging in, the items added when not logged in are retained in the shopping cart, but I don’t know how to determine whether it is the same user before and after.
    TAO author 2018-06-21 17:00:00
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!