Just another comment, since shopping carts are my favorite subject...
I use the two in conjunction. Every time someone adds an item, I create 
my  cart structure, calculate prices using the data in that structure, 
and stick the new item in the database, for the reasons you listed, for 
a sticky shopping cart like amazon's, and for stability. I've been 
burned by session variables in the past...
Anytime I need the users current cart, I use the exact same piece of 
code to create the structure from the database. This allows that whole 
process of getting the current cart to be 100% reliable, and stuck into 
a custom tag.

As far as performance goes, a dedicated server is going to be acceptable 
to the merchant by the time the site is selling enough goods to require 
it anyway. Going even further to a clustered server setup, those session 
varaibles can not be transfered across servers (hence my wish for a new 
multi-server in memory scope in the wishlist thread last week...), and a 
database becomes a necessity.

jon
Douglas Brown wrote:
> Hey, what about just using a database instead of using structures
> or arrays? That is pretty much what sql is for. The performance
> would be alot faster and  you would also be able to track people
> who did not complete the shopping experience and track what items
> are most opoular that people are looking at and maybe not
> buying....maybe the proce is too high and they found cheaper
> elsewhere.
> 

> Doug Brown

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to