Prev | Current Page 668 | Next

Emilian Balanescu and Cristian Darie

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

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}" />

















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:
656657658659660661662663664665666667 668 669670671672673674675676677678679680
wynajem mieszkań Krakówkobiecymeble drewnianeLeona Lewisprezenty
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"}