Extending the existing promotions functionality can involve doing any one or more of the following:
Specifying multiple targets for a discount
Creating new promotion types (these map directly to pricing engines, and by default the types include item, order, or shipping)
Creating new discount calculators (by default, Oracle ATG Web Commerce includes standard and tiered calculators). Calculator types map to Nucleus components.
The PMDL stores the discount information and ties together a set of target items with the discount that should be applied. PMDL allows you to include multiple targets and multiple discount structures in the same promotion, but the latter must all be the same promotion/pricing engine type.
For example, say you want to create another tiered pricing calculator to handle a special discount, such as free ground shipping.
Write a new discount calculator as a Nucleus component. The new calculator should implement the
calculatorInfoProvider
interface. The interface provides acalculatorinfo
object that describes the calculator, including the discount types that it supports and the attributes that calculator is interested in.Configure the item pricing engine to add the new calculator type, using the
calculatorTypeCalculators
map in the pricing engine.The new calculator and discount type appears automatically in the Advanced Template (see the ATG Merchandising Guide for Business Users), and you can also create your own custom templates that use this discount type.
If you add a new calculator type, you will most likely modify an existing calculator to support it, perhaps by adding a new method (see the Commerce Pricing Calculators chapter).