Prev | Current Page 652 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

We??™re not going to implement massive changes to the order administration code
at this stage, because we??™ll just end up modifying it later after we??™ve finished the new order
processing system.
Figure 17-1 shows the admin_orders template. This page gives administrators various
means of filtering current orders.
CHAPTER 17 ?–  STORING CUSTOMER ORDERS 552
Figure 17-1. The orders_admin template in action
No matter what selection method we use, we??™ll get a list with the orders that match the
criteria. In Figure 17-2, we can see the order Jane has just placed.
Figure 17-2. The orders administration page
The admin_order_details template looks like the one shown in Figure 17-3. Notice the tax
and shipping data, which we??™ll add later in this chapter.
CHAPTER 17 ?–  STORING CUSTOMER ORDERS 553
Figure 17-3. Administering order details
Exercise: Updating the Presentation Tier
1. Add the highlighted code to presentation/templates/admin_orders.tpl:
{* admin_orders.tpl *}
{load_presentation_object filename="admin_orders" assign="obj"}
{if $obj->mErrorMessage}

{$obj->mErrorMessage}

{/if}


CHAPTER 17 ?–  STORING CUSTOMER ORDERS 554


Show orders by customer