O'Reilly logo

Effortless E-Commerce with PHP and MySQL, Second Edition by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 check out. For this website, 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.

Defining the Procedures

Because this site uses an MVC approach, the chapter begins by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required