Groups > Databases > MySQL for ASP.NET > Re: When/How to save shopping cart information to database




When/How to save shopping cart information to database

When/How to save shopping cart information to database
Thu, 20 Mar 2008 22:38:13 +000
What is the best time to save a clients shopping cart information to the
database. (I intend to use paypal to process)

Also then, how do I do this?
Post Reply
Re: When/How to save shopping cart information to database
Fri, 21 Mar 2008 17:25:20 +000
I would do it everytime they add or remove an item.

Just create a many-to-many table that stores the product SKU and User ID.  If
they add an item, add a reference.  If they remove the item, use the command,
"Delete from Cart where User_ID = 'ID' AND SKU = 'SKU';" and vise
versa "Insert into Cart values ('ID','SKU');"
Post Reply
about | contact