Last post Sep 29, 2014 04:51 AM by Eileen ni - MSFT
Jul 15, 2009 03:39 AM|zielony|LINK
When user isn't registered he can add items to shopping cart or not ? Because I can't find in this project nothing with sessions.
Jul 15, 2009 02:59 PM|vora_bhaumik|LINK
You can add if you want to allow user to add product in to the Cart with out authente in to the site by maintaining that value in to the Session.
using Browser's Session.
use string sesssion = Session.SessionID;
you can get that Perticular user's browser Session id.
Jul 15, 2009 03:23 PM|zielony|LINK
But now only loged on/authenticated users can add items to cart or not ?
Jul 16, 2009 12:00 AM|vora_bhaumik|LINK
Yes you can, just check the the user is authentictaed or not on Page_Load. If user is authenticated then user can add item on the Cart.
On the click event of the Perticular Item check the User is authentictaed or not. If the User is authenticted then it will add in cart and if not authenticted then show the messgae that "Please Login."
Jul 16, 2009 12:38 AM|zielony|LINK
And before placed an order, items in cart are saved in session or in database ?
Jul 16, 2009 01:45 AM|vora_bhaumik|LINK
Check both the links such a nice Example ,
Sep 29, 2014 04:51 AM|Eileen ni - MSFT|LINK
Thanks for your post.
Does shopping cart use sessions ?
Yes.There is a project use session with shopping cart:
Hope this can be helpful.