Enabling and disabling the optimized tax command
The optimized tax command provides improved performance for sites that encounter shopping carts that include hundreds of order items or more.
Procedure
- Enabling optimized tax command
- Register the optimized tax command as a calculation
method for sales tax or use tax in the CALMETHOD table. For example:
INSERT INTO CALMETHOD (CALMETHOD_ID, STOREENT_ID, CALUSAGE_ID, TASKNAME, DESCRIPTION, SUBCLASS, NAME) VALUES ( method_ID, -1, -3, 'com.ibm.commerce.order.calculation.FastTaxCalculationRuleCombineCmd', 'Sample CalculationRuleCombine method for sales/use tax to improve performance', 5, 'FastTaxCalculationCodeCombine')
- Get the original value of STENCALUSG.ACTRC_CALMETHOD_ID
before performing the next step. For example:
Record this value.SELECT ACTRC_CALMETHOD_ID FROM STENCALUSG WHERE CALUSAGE_ID=-3
- Update the sales tax or use tax configurations in the
STENCALUSG table to reference this calculation method. For example:
UPDATE STENCALUSG SET ACTRC_CALMETHOD_ID= method_ID WHERE CALUSAGE_ID=-3
- Repeat for shipping tax, using the same SQL as for step 3, except with CALUSAGE_ID=-4.
- Update the Commerce Commands registry.
- Register the optimized tax command as a calculation
method for sales tax or use tax in the CALMETHOD table. For example:
- To disable the optimized tax calculation command:
- Get the original values of ACTRC_CALMETHOD_ID found in step two of the enablement procedure, including sales and shipping tax
- Update the sales tax and shipping tax configurations in the STENCALUSG
table to reference this calculation method. For example:
UPDATE STENCALUSG SET ACTRC_CALMETHOD_ID= original_method_ID WHERE CALUSAGE_ID=-3 UPDATE STENCALUSG SET ACTRC_CALMETHOD_ID= original_method_ID WHERE CALUSAGE_ID=-4
- Update the Commerce Commands registry.