re[8]: [ACFUG Discuss] saving shopping carts

2006-08-30 Thread Mischa Uppelschoten ext 10
Thanks all for your input. I think I'm going to set a client var as soon as a cart is started and then a session var to flag whether a cart has been loaded from a previous session. That should prevent a db query for every page view and should also handle spiders that do not accept cookies. Also

RE: re[6]: [ACFUG Discuss] saving shopping carts

2006-08-30 Thread Rick Lansford
That's the way I do it. Instead of a separate temp table I just add a column for a switch and if the shopper buys I set the switch to 1. I set up a scheduled task to delete all the 0's that are over 2 months old, just to keep the table cleaned out. I'm not worried about the cookie hijacking because

Re: re[6]: [ACFUG Discuss] saving shopping carts

2006-08-30 Thread Teddy Payne
The unique ID in a cookie leaves you open for cookie hikacking.  Even though it is for shopping, any information that could verify your identity or habits is potentially dangerous.  The best idea that I can offer Mischa is that you offer a button that says 'Save Cart' and that way you force the use

Re: re[6]: [ACFUG Discuss] saving shopping carts

2006-08-30 Thread Precia
You may wish to have 2 cart tables.  tblTempCart and tblCart with basically the same structure.  When a user completes the payment transaction, then move the information from tblTempCart to tblCart and purge the tblTempCart information of the user.  You may end up with many abandoned carts, so sett

re[6]: [ACFUG Discuss] saving shopping carts

2006-08-30 Thread Mischa Uppelschoten ext 10
Ok, makes sense. I guess the db is the only place the shopping cart is stored? In other words, every change the user makes to the cart is applied directly to the database? Mischa. > What I do is set a cookie using a unique id. I store the shopping cart info in a database along with the unique id

RE: re[4]: [ACFUG Discuss] saving shopping carts

2006-08-30 Thread Rick Lansford
What I do is set a cookie using a unique id. I store the shopping cart info in a database along with the unique id. If the shopper leaves and returns, I read the cookie and get the shopping cart info from the DB and let them pick up where they left off. I also set the unique id as a SESSION VAR so