Shopping cart

Results 1 to 3 of 3

Thread: Shopping cart

  1. #1
    Join Date
    Dec 1969

    Default Shopping cart

    I&#039m currently working on a shopping cart... I&#039ve created many before using the dictionary object to store items, however, now I am working on a large(r) site -- around 1000 items, and would prefer to use a database. We&#039re hoping for a fair amount of traffic and I don&#039t want memory being wasted with variables. The database will be created in MS Access97 (I know SQL would be ideal, but there are a few issues... one being cost -- I&#039m not too familar with the free SQL equivlent, MSDE -- I think).<BR><BR>I&#039m planing on storing items based on User ID (if logged in) or SessionID (if not logged in)... One problem I am encountering is removal of items from the cart if a customer (SessionID only -- no problem with logged-in users leaving items in cart) leaves without first removing them. Any customer coming to the site who receives the same SessionID will already have items in the cart... (not to mention used carts taking up alot of database space) any idea around this? I could create a page to check if the user is on, if they&#039re not, it would delete their cart; but I&#039d prefer to have everything automated so memory is cleared as soon as possible.<BR><BR>Thank you

  2. #2
    PratQ Guest

    Default RE: Shopping cart

    Well, ideally it would be best to only allow logged-on users to store things in the shopping cart, since they are the ones that a probablly most serious about buying. But assuming the requirement is to support both user-types, you might try using the session_onend event in the global.asa. In that event you can clear out the existing items in the cart.

  3. #3
    G Waddell Guest

    Default RE: Shopping cart

    Why don&#039t you force people to log in? you just hold an id for them in a session variable and if this doesn&#039t exist hit them with a login dialog box / new account details what-ever i.e.<BR>on every page put an include file that contains something like this:<BR><BR>If (isnull(session("userID")))or (session("userID")="")then<BR>response.redirect "login.asp"<BR>response.end<BR>end if<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts