0)
$this->mTax = round((float)$this->mTotalCost *
(float)$this->mOrderInfo['tax_percentage'], 2)
/ 100.00;
$this->mTotalCost += $this->mOrderInfo['shipping_cost'];
$this->mTotalCost += $this->mTax;
CHAPTER 17 ?– STORING CUSTOMER ORDERS 566
// Format the values
$this->mTotalCost = number_format($this->mTotalCost, 2, '.', '');
$this->mTax = number_format($this->mTax, 2, '.', '');
// Value which specifies whether to enable or disable edit mode
if (isset ($_GET['submitEdit']))
$this->mEditEnabled = true;
8. Modify the presentation/templates/admin_order_details.tpl template as highlighted:
value="{$obj->mOrderInfo.order_id}" />
Total Amount: ${$obj->mOrderInfo.total_amount}Tax: {$obj->mOrderInfo.tax_type} ${$obj->mTax} Shipping: {$obj->mOrderInfo.shipping_type} Date Created: {$obj->mOrderInfo.created_on|date_format:"%Y-%m-%d %T"} How It Works: Handling Tax and Shipping Issues Note that this is one of the most crucial pieces of code in this chapter. This is the code where you??™ll most likely make any modifications to the tax and shipping systems if you decide to implement your own system.
Pages:
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680