Accessibility

Dreamweaver Article

How to Develop an Online Shopping Cart (Part One)


Lawrence Cramer

Lawrence Cramer

www.cartweaver.com

Table of Contents

  1. Introduction
  2. Cart Logic
  3. Data-Basics

This is part one of a three-part series on shopping carts. In parts one and two, I will give you the background theory and knowledge to understand how shopping carts work and what you need to know to build one. In part three, I will lead you through actually building a simple shopping cart in ColdFusion using Dreamweaver MX 2004.

Today, many more developers are being asked to create e-commerce or shopping cart web sites for their clients or employers. At first, this can seem like a daunting and even frightening task. Let’s ease those fears by demystifying online shopping carts. To simplify things, I will break an e-commerce application, which is a shopping cart, into its basic components and analyze them one by one. As you go, you will progressively see how they work together.

There are many ways to approach the actual development, but regardless of size, server platform, database type or structure, the underlying logic remains the same. Once you have a handle on the basics, the details become clearer and less overwhelming. For this article, I will cover the first two components you will need to understand to get started.

The Cart

The logic behind an online shopping cart is actually quit simple. You simply need to remember what the customer wants to buy until they "check out" and place their order.

The Database

First, you must show the customer what you have to sell. You don't have to have a database for this, but you should. Then, once the customer places their order, you must capture the order for your records. This is where you use a database.



About the author

Lawrence's day job is web application development. He also develops Dreamweaver Extensions, helps out on the Macromedia forums, teaches at the local Community College, speaks at web development conferences around the country, and writes articles on web development and e-commerce. For fun, he takes motorcycle road trips and occasionally catches a fish or two with his wife of 25+ years. Lawrence has three children—two daughters and one son. Two are grown and one is still in school. You can find him at lawrence@cartweaver.com.