The atg.commerce.pricing.ItemDiscountCalculator class calculates the new price for an item or items based on a given pricing model. It applies the discount that the pricing model describes to the price in the ItemPriceInfo corresponding to each passed CommerceItem. The discount can be a fixed amount, a percentage, or a fixed price.

The ItemDiscountCalculator class inherits all the properties of DiscountCalculatorService. See the ATG Platform API Reference for detailed information on ItemDiscountCalculator and its related classes.

The ItemDiscountCalculator component is a preconfigured instance of the class atg.commerce.pricing.ItemDiscountCalculator class. It is the default discount calculator for the item discount promotions.

The following table describes the properties of the ItemDiscountCalculator component.

Property

Description

pricingModelProperties

Specifies a bean that hosts the names of all of the properties of a pricing model repository item.

qualifierService

Specifies a Qualifier that performs the actual evaluation of a pmdlRule of the PricingModel against the running environment. See the Qualifier Properties section for additional information.

negativeAmountException

Oracle ATG Web Commerce never discounts the price of an item to less than zero. This property determines what happens when a discount would cause the amount of an item to be negative.

True: Throw an exception when a discount causes an amount to be negative.

False: (default) Log a warning message and set the amount to 0.0 when a discount causes an amount to be negative.

You can view and modify this component in the ATG Control Center. Its location is /atg/commerce/pricing/calculators/ItemDiscountCalculator.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices