Prev | Current Page 646 | 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 .
'&item_number=' . $order_id .
'&amount=' . $this->mTotalAmount .
'¤cy_code=' . PAYPAL_CURRENCY_CODE .
'&return=' . PAYPAL_RETURN_URL .
'&cancel_return=' . PAYPAL_CANCEL_RETURN_URL;
8. Place an order or two using the new system to check that the code works. To do this, you??™ll need to log on
and supply enough details to get past the validation on the checkout page.
CHAPTER 17 ?–  STORING CUSTOMER ORDERS 546
?– Note At this stage, the orders administration page does not work. It needs to be modified to work with
our new functionality.
How It Works: Adding Customer Orders to TShirtShop
The code added in this exercise is very simple and hardly merits much attention. The order handling functions in
the data and business tiers now take as a parameter a customer ID, which is assigned to the order.
After we??™ve implemented more of the new ordering code, we??™ll be able to provide more information to customers,
such as sending them confirmation e-mails. For now, however, this is as far as we can take things.
Administering Customer Orders
OK, right now, our database associates orders with their customers. Next, we need to update
the order administration pages, because the old ones don??™t work anymore. This involves various
modifications to the data and business tiers to provide new data structures and access code
in the administration system for orders we developed in Chapter 14.


Pages:
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658
poker online znaki drogowe reklama Kredyt hipoteczny kalkulator poker