The PricingTools
class contains the performPricingOperation
method, which calls the isOrderRestrictedForPricing
method. Passing in the order
as a parameter, this method verifies that the order does not contain any of the price restricting operations identified by the restrictedPricingOperations
property.
By default, the restrictedPricingOperations
configuration directs to the TAX
pricing operation:
restrictedPricingOperations=\ ORDER_TOTAL=TAX,\ ORDER_SUBTOTAL_TAX=TAX,\ TAX=TAX
If the pricing operation should be restricted, the necessary pricing operation is retrieved using the getRestrictedPricingOperations
method. This method also looks at the ExtraParameters
map for the RESTRICTED_PRICING_OPERATIONS
key. This allows the restrictedPricingOperations
property to be replaced with the corresponding Map. If a new Map is not found, the restrictedPricingOperations
Map is used. If no pricing operation is found, the NO_REPRICE
pricing operation is returned.
You can configure restrictedPricingOperations
to redirect pricing to different operations defined within the PricingConstants
interface.
Note: You must use the string values, and not the pricing constant names. For example, use the ORDER_TOTAL
string instead of the PricingConstants.OP_REPRICE_TOTAL_ORDER
.
For detailed information on PricingTools
, refer to the ATG Platform API Reference.