Does shopping cart use sessions ?

Last post 07-16-2009 1:45 AM by vora_bhaumik. 5 replies.

Sort Posts:

  • Does shopping cart use sessions ?

    07-15-2009, 3:39 AM
    • Member
      46 point Member
    • zielony
    • Member since 06-24-2009, 6:22 AM
    • Posts 164

    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.

  • Re: Does shopping cart use sessions ?

    07-15-2009, 2:59 PM
    • Contributor
      2,042 point Contributor
    • vora_bhaumik
    • Member since 11-25-2008, 10:56 PM
    • Ahmedabad
    • Posts 339

    HI,

    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.


    Enjoy Smile

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.

    Regards,
    Bhaumik
  • Re: Does shopping cart use sessions ?

    07-15-2009, 3:23 PM
    • Member
      46 point Member
    • zielony
    • Member since 06-24-2009, 6:22 AM
    • Posts 164

    But now only loged on/authenticated users can add items to cart or not ?

  • Re: Does shopping cart use sessions ?

    07-16-2009, 12:00 AM
    • Contributor
      2,042 point Contributor
    • vora_bhaumik
    • Member since 11-25-2008, 10:56 PM
    • Ahmedabad
    • Posts 339

    Hi,

    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.

    Or

    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."




    Enjoy Smile

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.

    Regards,
    Bhaumik
  • Re: Does shopping cart use sessions ?

    07-16-2009, 12:38 AM
    • Member
      46 point Member
    • zielony
    • Member since 06-24-2009, 6:22 AM
    • Posts 164

    And before placed an order, items in cart are saved in session or in database ?

  • Re: Does shopping cart use sessions ?

    07-16-2009, 1:45 AM
    • Contributor
      2,042 point Contributor
    • vora_bhaumik
    • Member since 11-25-2008, 10:56 PM
    • Ahmedabad
    • Posts 339
    Enjoy Smile

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.

    Regards,
    Bhaumik
Page 1 of 1 (6 items)