The database
and business layer changes are far more general??”although that??™s not to say such modifications wouldn??™t be
necessary.
Before testing that the new system is working for tax and shipping charges, use the orders administration page to
check that old orders are unaffected. The information retrieved for an old order should be unaffected, because the
data is unchanged.
Place a new order, preferably for a customer in the United States/Canada shipping region (as this is currently the
only region where tax is applied). Notice that, on the checkout page, you must select a shipping option.
After placing the order, check the new order in the database. The result should look like the page shown in
Figure 17-3.
CHAPTER 17 ?– STORING CUSTOMER ORDERS 567
In this chapter, leading up to this example, we??™ve pretty much examined how the tax and shipping charges operate,
but let??™s recap. First, the customer is required to select a shipping region for his or her address. Without this
shipping region being selected, visitors cannot place orders, because they cannot select a shipping option. When
a visitor places an order, the shipping region selected is attached to the order in the orders table. The tax requirement
for the order is also attached, although this requires no user input and is currently selected using a very simple
algorithm.
Pages:
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681