Prev | Current Page 667 | Next

Emilian Balanescu and Cristian Darie

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

'&item_name=TShirtShop Order ' .
urlencode('#') . $order_id .
CHAPTER 17 ?–  STORING CUSTOMER ORDERS 565
'&item_number=' . $order_id .
'&amount=' . $this->mTotalAmount .
'¤cy_code=' . PAYPAL_CURRENCY_CODE .
'&return=' . PAYPAL_RETURN_URL .
'&cancel_return=' . PAYPAL_CANCEL_RETURN_URL;
4. In the same method, add the following code:
foreach ($shipping_regions as $item)
if ($item['shipping_region_id'] ==
$this->mCustomerData['shipping_region_id'])
$this->mShippingRegion = $item['shipping_region'];
if ($this->mNoCreditCard == 'no' && $this->mNoShippingAddress == 'no')
{
$this->mShippingInfo = Orders::GetShippingInfo(
$this->mCustomerData['shipping_region_id']);
}
}
}
}
?>
5. Update index.php by adding a reference to the orders business tier class, as shown here:
require_once BUSINESS_DIR . 'secure_card.php';
require_once BUSINESS_DIR . 'customer.php';
require_once BUSINESS_DIR . 'orders.php';
6. Continue modifying the AdminOrderDetails class from the presentation/
admin_order_details.php file by adding two members:
public $mLinkToOrdersAdmin;
public $mCustomerInfo;
public $mTotalCost;
public $mTax = 0.0;
7. Add these lines to the AdminOrderDetails class in the init() method:
$this->mOrderInfo = Orders::GetOrderInfo($this->mOrderId);
$this->mOrderDetails = Orders::GetOrderDetails($this->mOrderId);
$this->mCustomerInfo = Customer::Get($this->mOrderInfo['customer_id']);
$this->mTotalCost = $this->mOrderInfo['total_amount'];
if ($this->mOrderInfo['tax_percentage'] !== 0.


Pages:
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
wyciągarki wróżby miłosne cukiernia-stykowscy.pl salon kosmetyczny kraków pompy ciepła