This section describes the following ATG Commerce pricing interfaces:

ItemPricingEngine Interface

atg.commerce.pricing.ItemPricingEngine is an extension of the PricingEngine interface. It describes an object that determines prices for atg.commerce.order.CommerceItem objects. The prices that are generated are ItemPriceInfo objects.

An ItemPricingEngine can determine prices in three ways:

ATG Commerce provides the ItemPricingEngineImpl class as a default implementation of the ItemPricingEngine interface. For more information, see Item, Order, Tax, and Shipping Pricing Engine Classes.

ItemPricingCalculator Interface

atg.commerce.pricing.ItemPricingCalculator modifies the price of a CommerceItem.

The item pricing engine invokes each calculator’s priceItem, priceEachItem, or priceItems method. The calculator’s priceItem method modifies the input priceObjects according to the current pricing context. The specific way in which the calculator modifies an item price varies according to individual implementations.

ATG Commerce includes several classes that are implementations of the ItemPricingCalculator interface. For example, it includes the atg.commerce.pricing.ItemListPriceCalculator class, which you can use to determine an initial price for an item without any discounting. For more information on this class and other classes that implement this interface, see Pricing Calculator Classes.

OrderPricingEngine Interface

atg.commerce.pricing.OrderPricingEngine is an extension of the PricingEngine interface. It describes an object that determines prices for Order objects (the total price of all items in a customer’s shopping cart). An OrderPricingEngine uses the priceOrder method to determine the price of an order.

The pricing context is defined by the priceOrder method’s input parameters. Implementations of this interface create an OrderPriceInfo object that accurately represents the price of an input order. The way in which they do this is depends on the implementation. The specific way in which the engine creates the order object varies according to individual implementations.

ATG Commerce provides the OrderPricingEngineImpl class as a default implementation of the OrderPricingEngine interface. For more information, see Item, Order, Tax, and Shipping Pricing Engine Classes.

OrderPricingCalculator Interface

The OrderPricingCalculator interface, atg.commerce.pricing.OrderPricingCalculator, modifies the price of an order.

The order pricing engine invokes the priceOrder method of the OrderPricingCalculator (or calculators) that it is configured to use. The priceOrder method modifies the input pPriceQuote according to the current pricing context. The specific way in which the calculator modifies an order price varies according to individual implementations.

ATG Commerce includes several classes that are implementations of the OrderPricingCalculator interface. For example, it includes the atg.commerce.pricing.OrderSubtotalCalculator class, which you can use to calculate the raw subtotal for an order before any discounts are applied. For more information on this class and other classes that implement this interface, see Pricing Calculator Classes.

ShippingPricingEngine Interface

atg.commerce.pricing.ShippingPricingEngine is an extension of the PricingEngine interface. It describes an object that determines prices for ShippingGroup objects.

Implementations of this interface determine the cost of shipping the contents of a shipping group. The priceShippingGroup method asks this object to determine a price for the specified shipping group. The getAvailableMethods call returns the methods available for shipping the specified group.

ATG Commerce provides the ShippingPricingEngineImpl class as a default implementation of the ShippingPricingEngine interface. For more information, see Item, Order, Tax, and Shipping Pricing Engine Classes.

ShippingPricingCalculator Interface

The ShippingPricingCalculator interface, atg.commerce.pricing.ShippingPricingCalculator, modifies a price object that represents the cost of shipping for an order.

The shipping pricing engine invokes the priceShippingGroup method of the ShippingPricingCalculator (or calculators) that it is configured to use. The priceShippingGroup method modifies the input pPriceQuote according to the current pricing context. The specific way in which the calculator modifies a shipping price varies according to individual implementations.

ATG Commerce includes several classes that are implementations of the ShippingPricingCalculator interface. For example, it includes the atg.commerce.pricing.ShippingDiscountCalculator class, which you can use to apply a promotional discount to the shipping price of an order. For more information on this class and other classes that implement this interface, see Pricing Calculator Classes.

TaxPricingEngine Interface

atg.commerce.pricing.TaxPricingEngine is an extension of the PricingEngine interface. It describes an object that determines taxes for Order objects.

Implementations of this interface determine the price for the tax associated with a specified order object. The interface provides one way to ask for a tax price. Calling code provides the pricing context by inputting the order, any pricing models (promotions), a locale in which the pricing should occur, the current profile, and any additional parameters.

ATG Commerce provides the TaxPricingEngineImpl class as a default implementation of the TaxPricingEngine interface. For more information, see Item, Order, Tax, and Shipping Pricing Engine Classes.

TaxPricingCalculator Interface

The atg.commerce.pricing.TaxPricingCalculator interface modifies the price of tax for an order.

The tax pricing engine invokes the priceTax method of the TaxPricingCalculator (or calculators). The calculator’s priceTax method modifies the input pPriceQuote according to the current pricing context. The specific way in which the calculator modifies a tax price varies according to individual implementations.

ATG Commerce includes several classes that are implementations of the TaxPricingCalculator interface. For example, it includes the atg.commerce.pricing.NoTaxCalculator class, which you can use for situations in which a sales tax of zero is applicable for an order. For more information on this class and other classes that implement this interface, see Pricing Calculator Classes.

PricingConstants Interface

The atg.commerce.pricing.PricingConstants interface contains constant values for static reference by other classes in the atg.commerce.pricing package.

 
loading table of contents...