The OrderManager Class

The OrderManager class is really a utility class used for manipulating product and order information. It is also responsible for calculating shipping, tax, and order total amounts. Most of this functionality will be covered in Chapter 15. This section deals mainly with the order manipulation responsibilities of the OrderManager class, especially where the gift certificate functionality is concerned.

Remember that the OrderManager class is used in the Checkout.aspx.cs code behind class. Order totals are generated by the OrderManager class and used on the checkout page.

The OrderManager.GenOrderTotals method calculates an order's subtotal and inserts it into the basket. Listing 11.5 shows this method.

Listing 11.5. The

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.