The TaxPricingEngine
component is a preconfigured implementation of the TaxPricingEngineImpl
class. It determines the price of tax for an order by invoking a series of TaxPricingCalculators
. It uses the same mechanisms as the ItemPricingEngine
component for determining which promotions to apply to tax.
The TaxPricingCalculator
determines if an item is taxable using pricingTools.isTaxable()
method. If an item is taxable, pricingTools.isTaxable()
returns true. By default, all items are taxable. pricingTools.calculateTaxableAmount()
then determines the tax by returning 0 if isTaxable
returns false, otherwise it returns the price of the item minus its orderDiscountShare
.
The following sample shows the contents of the TaxPricingEngine.properties
file:
# The TaxPricingEngine service # $class=atg.commerce.pricing.TaxPricingEngineImpl defaultLocale^=PricingTools.defaultLocale priceInfoClass=atg.commerce.pricing.TaxPriceInfo pricingModelProperties=PricingModelProperties #promotionTools=../promotion/PromotionTools #profileProperties=activePromotions #promotionsRepository=Promotions #promotionItemTypes= #globalPromotionsQuery= #preCalculators=\ # calculators/NoTaxCalculator preCalculators=\ calculators/TaxProcessorTaxCalculator scheduler=/atg/dynamo/service/Scheduler updateSchedule=every 15 minutes in 15 minutes
You can view and modify this component in the ATG Control Center. Its location is /atg/commerce/pricing/TaxPricingEngine
.
For more information on how to use this component, refer to the description of TaxPricingEngineImpl
in the Pricing Engine Classes section.