>My thinking behind not using a db table was that I would need to clean >it up somehow, and the fact that the client variable db was >automatically cleaned out over time (imperfect assumption on my part) >did that job for me.
There are a lot of advantages to using the database and as a shopping cart becomes more and more complex, those become even more apparent. For instance, if your client decides at some point to track abandoned carts, this is far more easily done if that data is available directly from the database. It's a pretty simple function to just create a scheduled task that will clear out your cart tables on a regular basis, using a time stamp when you create the records to find the old ones. For my ecommerce product, pretty much everything is stored in the database, and then I just use a session variable with the cart ID, which also is saved to the user cookies and to the user table for logged in users as well. I also save a cart summary (items/total) to the session so I can display this on each page without recalculating the entire cart (which can be a LOT of calculation with a complex ecommerce app like mine). This gives you a pretty good persistent cart, with a very minimal amount of stuff needing to be kept in the session and/or cookies. So a lot depends on how simple you intend the cart to be, and the likelihood of it becoming more complex over time. ---- Mary Jo Sminkey [email protected] Author of CFWebstore, CF-based E-commerce http://www.cfwebstore.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317481 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

