Prev | Current Page 719 | Next

Emilian Balanescu and Cristian Darie

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

php. Add the GetAuditTrail() method to the
Orders class in business/orders.php as follows:
// Gets the audit table entries associated with a specific order
public static function GetAuditTrail($orderId)
{
// Build the SQL query
$sql = 'CALL orders_get_audit_trail(:order_id)';
// Build the parameters array
$params = array (':order_id' => $orderId);
// Execute the query and return the results
return DatabaseHandler::GetAll($sql, $params);
}
CHAPTER 19 ?–  IMPLEMENTING THE ORDER PIPELINE: PART 2 615
Implementing the Presentation Tier
We need to update the admin_order_details componentized template, which shows the details
of an order. Earlier in this book, this componentized template also included the capability to
test the order process, but we??™re removing this here. Instead, we??™ll provide the capability for
orders to be pushed along the pipeline when they are stuck at the ???Awaiting confirmation of
stock??? and ???Awaiting confirmation of shipment??? stages.
Now, we can also display all the audit information for the order in another new table. Let??™s
look at what we??™re going to achieve, as shown in Figure 19-7.
We can split the ORDERS ADMIN page into three sections:
??? In the first section, we??™ll change the Process button to a confirmation button for suppliers.
??? In the second section, a table is filled with the items data from the order.


Pages:
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731
miller quady Meble Gabi torpado Wczasy nad morzem