Open presentation/store_front.php file, and modify the init() method of the StoreFront class,
adding the highlighted code to load either order_done.tpl or order_error.tpl, depending on whether
the order processed successfully or not:
if (isset ($_GET['Checkout']))
{
if (Customer::IsAuthenticated())
$this->mContentsCell = 'checkout_info.tpl';
else
$this->mContentsCell = 'checkout_not_logged.tpl';
CHAPTER 19 ?– IMPLEMENTING THE ORDER PIPELINE: PART 2 613
$this->mHideBoxes = true;
}
if (isset($_GET['OrderDone']))
$this->mContentsCell = 'order_done.tpl';
elseif (isset($_GET['OrderError']))
$this->mContentsCell = 'order_error.tpl';
// Load the page title
$this->mPageTitle = $this->_GetPageTitle();
}
We can now use the TShirtShop web store to place orders, but they will pause when it gets to stock confirmation.
To continue, we??™ll implement the interface that suppliers and administrators use so we can force orders to continue
processing.
Updating the Orders Administration Page
The basic functionality of this page is to allow suppliers and administrators to view a list of
orders that need attention and manually advance those orders in the pipeline. This is simply
a case of calling the OrderProcess::Process() method as described earlier.
This page could be implemented in many ways. In fact, in some setups, it might be better
to implement this as a stand-alone application, for example, if your suppliers are in-house
and on the same network.
Pages:
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729