Storing Cart Information

One of the first things to consider when building a shopping cart is how to store the shopping-cart information. Most users expect to be able to add items to a cart, go somewhere else (perhaps back to your storefront page or to another site for comparison shopping), and then return later to check out. This means you need to maintain the contents of each user’s cart somewhere on your site.

No matter how you decide to store the information, you usually have at least two pieces of information to maintain:

  • Items Added to the Cart. In most situations, each item will have its own unique identifier (in the sample database, this is the MerchID column in the Merchandise table), so remembering which items the user has added to ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.