Shopping Cart and Session


I want to have store the contents of a user's shopping cart between
site visits. Anyone done this lately? I'm trying to determine the
best mechanism to use. I gather I could store it in a database, maybe
client variables (I haven't used those in years ?

Any thoughts appreciated.

If there is anything in Coldbox that may aid me I'd be open to using
that as well.


One option is to store the cart id encrypted in a cookie that doesn’t expire soon. Check for the cookie. If it exists, decrypt and get their cart. If it doesn’t or if something goes wrong, give them a new cart.

  • Gabriel

I would suggest doing a db based cart and either a cookie that identifies them like gabriel mentioned.
Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


Thanks for the replies. I think I'm going to go the db route and see
how that plays out.