C# .NET - eshop cart - Asked By sara asa on 19-Feb-11 08:45 AM

Hi all,

Actually I am writing my eshop.but now I have problem  with  implemented cart.i want all users without login can add products to their basket .but I don’t want use cookies for this and that famous problem(msg show user if your basket still is empty set  cookies in your browser).but if I want use session or table(sth like user_id) I need my users get login and I don’t want that either.what can I do?

Ty.

Mihir Soni replied to sara asa on 19-Feb-11 10:07 AM
Hey.

Yes you can do one thing is either you can use MEMBERSHIP concept of ASP.NET which will store each and everything for particular user.

Secondly you can also make your own table which will help you to do this things and you can track all carts from your database.

Session is thing which will destroy after user close the browser and he/she won't be able to access when they will visit your website again.

you can store session id in your table and can also track your cart.

Thank you
David Nguyen replied to sara asa on 20-Feb-11 01:59 AM
Hi,

For your issue, you can still generate a UniqueID value for storing each user, then store all products he added into db with relation to that UniqueID. Once he logs in, you will save all such information of product for the correct UserID.

Regard,
David
sara asa replied to David Nguyen on 21-Feb-11 12:40 PM
ty
sara asa replied to Mihir Soni on 21-Feb-11 12:42 PM
ty..i would try with table first.