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

Viewing orders

The orders section of a customer's account area should be broken into two areas:

  • List of orders, so the customer can select the order they wish to see in more detail
  • Viewing order-specific details

Listing orders

To list a customer's order, we simply need a single query to lookup their orders and their status, which we can then cache and send to the template. Within the list of orders, we would want to display the following information:

  • Order ID or reference
  • The total cost of the order
  • The status of the order
  • The date the order was placed
  • We may also wish to display the date the order was last updated, which could indicate when the order was dispatched, or cancelled, or payment was processed

Query

The following query would allow us to list ...

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