Using the OrderManager Class to Implement Discount Specials

The OrderManager class is instrumental in implementing the product special features in MyGolfGear.NET. This class is responsible for basic order manipulation, such as basic basket manipulation and order processing (including shipping and tax calculations as well as credit card authorization).

The OrderManager class is responsible for using the CatalogDS and ProductSpecialDataTable classes to determine a product's promotional price. The GetPromoPrice method, shown in Listing 8.3, does this.

Listing 8.3. The GetPromoPrice Method
 public decimal GetPromoPrice(System.Guid productid, decimal price) { decimal promoprice = 0; CatalogDS catalogds = (CatalogDS)HttpRuntime.Cache.Get("CatalogDS"); ...

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.