9: Building a Shopping Cart

In the previous chapter, an online catalog of products was developed, complete with buttons for adding items to the customer’s shopping cart. Now it’s time to implement the cart itself. A good shopping cart shows customers exactly what they have in their basket and provides ways to remove items, update the quantities, and to check out. For this Web site, there’s also a “wish-list” feature, allowing the customer to save cart items for later.

The bulk of this chapter will focus on writing the shopping cart and wish-list features. First, though, new stored procedures are required. The chapter ends with various ways to factor in shipping as well as a discussion of other additions you could add to this process.

Defining ...

Get Effortless E-Commerce with PHP and MySQL 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.