O'Reilly logo

PHP 5 e-commerce Development by Michael Peacock

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

Providing wish lists

Wish lists allow customers to maintain a list of products that they would like to purchase at some point, or that they would like others to purchase for them as a gift.

Creating the structure

To effectively maintain wish lists for customers, we need to keep a record of:

  • The product the customer desires
  • The quantity of the product
  • If they are a logged-in customer, their user ID
  • If they are not a logged-in customer, some way to identify their wish-list products for the duration of their visit to the site
  • The date they added the products to their wish list
  • The priority of the product in their wish lists; that is, if they really want the product, or if it is something they wouldn't mind having

Let's translate that into a suitable database ...

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