Hour 16. Building a Simple Shopping Cart

Nearly all Web sites that sell merchandise over the Internet include that ubiquitous element—the shopping cart. Most shopping cart applications work by assigning the user a session identifier, and associating the user’s purchase choices with that identifier. The application keeps track of the user’s activities by carrying the identifier from page to page within the site. When the user is ready to “check out,” the application retrieves all the items to be purchased.

This hour demonstrates how to build a simple shopping cart by discussing the following topics:

  • How shopping cart applications work

  • How to build a catalog

  • How to build a shopping cart

  • How the checkout procedure for an online store works

Get Sams Teach Yourself CGI in 24 Hours, Second Edition 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.