Enable 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

  1. Enable optimized tax command

    1. 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')

    2. Get the original value of STENCALUSG.ACTRC_CALMETHOD_ID before performing the next step. For example:

        SELECT ACTRC_CALMETHOD_ID FROM STENCALUSG WHERE CALUSAGE_ID=-3

      Record this value.

    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

    4. Repeat for shipping tax, using the same SQL as for step 3, except with CALUSAGE_ID=-4.

    5. Update the Commerce Commands registry.

  2. To disable the optimized tax calculation command:

    1. Get the original values of ACTRC_CALMETHOD_ID found in step two of the enablement procedure, including sales and shipping tax

    2. 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

    3. Update the Commerce Commands registry.