The atg.commerce.pricing.PricingTools class is the main way in which business-layer logic interacts with the pricing engines and the other classes in the atg.commerce.pricing package. In Oracle ATG Web Commerce, the classes that extend the ItemPricingDroplet class (PriceItemDroplet and PriceEachItemDroplet) use PricingTools to interface with all the Commerce pricing engines.

When a store using Commerce needs a price for items, orders, shipping, or tax, PricingTools can be consulted to return the price. In addition, PricingTools contains translation functions that identify which currencyCode goes with which locale.

PricingTools includes methods that can be called to produce prices. These methods consult the configured pricing engines, which are described in detail in the Commerce Pricing Engines chapter.

PricingTools also determines the pricing locale. If you are using SKU-based pricing (instead of price lists; see Using Price Lists for information), PricingTools returns the configured defaultLocale property. The pricing engines use this to determine the currency code. If you are using Oracle ATG Web Commerce’s multisite feature and want to use different currency codes for different sites, you can take the following steps:

  1. Add a pricing locale to the Site repository items.

  2. Override the PricingTools.getDefaultLocale method to retrieve the currency code for the site.

See the ATG Platform API Reference for detailed information on the properties and methods of this class.