The atg.commerce.pricing.GWPPriceCalculator is located at /atg/commerce/pricing/calculators/GWPPriceCalculator in Nucleus. The calculator checks for commerce items that have Gift with Purchase commerce item markers (see the Gift with Purchase Promotions section of the Understanding Promotions chapter in this guide).

By default this calculator is used as a pre-calculator. For any commerce items that include a Gift with Purchase marker, the calculator retrieves the promotion ID and the free quantities from the marker. The calculator then adjusts the item’s pricing to free.

A single commerce item can be used for multiple promotions; therefore, there can be multiple markers on the commerce item. Each marker is processed separately and results in an additional quantity being marked free.

The GWP calculator can target existing items in the cart to be free but otherwise does not update the order at all; it just updates a Map of GWPInfo objects. All order updates to add/remove commerce item quantity and markers are handled by the GWPManager component.


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