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


The following query would allow us to list ...

Get PHP 5 e-commerce Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.