Personally I prefer it all in a database. It's far easier to manage,
you're probably going to need to query the database anyway to get
information such cart contents, recommended items, storing cart
contents for registered users, totals and loading up the newer prices
and stock level if a customer returns to finish the order over a few
sessions over several days. Also makes it easier to crunch all that
data about what people are looking at buying etc...

Just make sure you include a clean up routine to drop carts older then
say a month and extend your sessions to several days. I usually shop
for things over several days.

If you are worried about database performance, then storing a cart
summary in a file based database cache may give you some increase
performance where the database is getting hit hard and disk use it
low. I don't know anything about Redis, memcached or APC, but could be
useful for storing those common/seldom change summary info.

Security, once a hacker has found an exploit they have your data, both
sessions and databases are stored on disk. Phpmyadmin adds a slight
side door perhaps, maybe. Storing it all in a cookie is very unsecure,
dont do that.

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to