Adding items to a shopping cart by users before registration/authentication

Discussion in 'eCommerce' started by Vincentas, Jan 4, 2013.

  1. #1
    Hi guys,

    may I know how should I allowed not-login user to add items? (We are using customized solution without using an open source eCommerce package)

    The consideration is:

    1. Store at database: If the not-login user information is stored in database as guest user(create a newid for each user and store that id as in session of the browser), then how should we know when to delete them?
    2. Store at client: If all information is maintained in cookie, it would need to write a seperate set of code for this, that would be troublesome.
    Is there any suggestion?
     
    Vincentas, Jan 4, 2013 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    The cart database shouldn't have any required relationship with a users database. You would simply use a user's session ID to keep track of shopping cart items in the database. This covers members and guests. You can use an optional reference to the member table if you want a persistent cart for logged in users.
     
    jestep, Jan 4, 2013 IP