[thelist] in-principle, PHP/mySQL shopping basket question

Chris W. Parker cparker at swatgear.com
Wed Jul 23 12:26:31 CDT 2003


john at johnallsopp.co.uk <mailto:john at johnallsopp.co.uk>
    on Wednesday, July 23, 2003 8:06 AM said:

> That makes the problem worse, as I was intending to write the basket
> to the database. If I do that and the session variable is cleared up,
> then I still have a database with a basket in it ... but (the penny
> drops) .. I guess you're saying I shouldn't bother with the database,
> just store an array of product ids in session variables. That makes
> sense.

I don't think you should rely on storing all the product data in a
session variable. How do you plan to do saved carts that way? If someone
leaves for 1 week their session will surely be deleted, but that doesn't
mean they don't want their saved cart still.

The database also offers other benefits like having the ability to
create reports on abandoned carts and the amount of saved carts, and
things like that.


Chris.


More information about the thelist mailing list