');
break;
default:
$this->_mOrderProcessStage = 100;
throw new Exception('Unknown pipeline section requested.');
}
}
5. Open business/orders.php, and replace the $mOrdersStatusOptions array of the Orders class to
manage the new order status codes. Note that this change affects the old orders, which used different status
codes:
public static $mOrderStatusOptions = array (
'Order placed, notifying customer', // 0
'Awaiting confirmation of funds', // 1
'Notifying supplier-stock check', // 2
'Awaiting stock confirmation', // 3
'Awaiting credit card payment', // 4
'Notifying supplier-shipping', // 5
'Awaiting shipment confirmation', // 6
CHAPTER 19 ?– IMPLEMENTING THE ORDER PIPELINE: PART 2 604
'Sending final notification', // 7
'Order completed', // 8
'Order canceled'); // 9
6. Open presentation/admin_order_details.php, and add the highlighted new member to the
AdminOrderDetails class:
public $mTax = 0.0;
public $mOrderProcessMessage;
7. Modify the code of the init() method in the AdminOrderDetails class located in presentation/
admin_order_details.php as highlighted. This will handle the functionality necessary when the visitor
clicks the Process button.
if (isset ($_GET['submitProcessOrder']))
{
$processor = new OrderProcessor($this->mOrderId);
try
{
$processor->Process();
$this->mOrderProcessMessage = 'Order processed, status now: ' .
Pages:
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723