Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am working with mvc4 now I need to add items to cart without user login and once the user logged into the site all the previous items that are added to the site how to work with this scenario?
Posted

1 solution

You need to have some uniqueness to know which user is accessing the site. May be before adding to cart just ask for his username if registered. Because while you will save into the database and when the user suppose adds items to cart today and come back and logs in tomorrow, we need to show the added items right!! So for that you need to add items along with some unique property to distinguish the user.
I hope you understand.
Please post back your queries if any.
Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900