Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

best way to store basket details in a shopping cart

Status
Not open for further replies.

tyutghf

Technical User
Apr 12, 2008
258
GB
What would you folks say is the best way to store someones shopping basket details in a shopping cart?

The way I see it:

store all product info in sessions - if many shoppers can create a heavy load on server, if shopper leaves the page or is inactive for a while their basket is lost

Store in cookie - less load on server, can store for longer, secure?

Store in DB - this is the method I was initially going to use and use application object to create new basket id but what happens if webserver is restarted, will application restart and mess up the baskets?
 
we are using session object

the way i see it is a session object already exist so use that. if you get sooooo many customers you see server performance degrading then you will be making enough money from sales that you will be able to afford a server upgrade!!!

cookies rely on the user having cookies enabled.

generally i think it best to handle this sort of thing on the server, as then you don't have cross-browser compatability issues and can do different things depending on what is in the basket (does the customer have spend limits,...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top