Enable and disabling the optimized shipping calculation command
The optimized shipping calculation command provides improved performance for sites that encounter shopping carts that include hundreds of order items or more.
Procedure
- Enable optimized shipping calculation command.
- Register this command as a calculation method for shipping in the CALMETHOD table. For example:
INSERT INTO CALMETHOD (CALMETHOD_ID, STOREENT_ID, CALUSAGE_ID, TASKNAME, DESCRIPTION, SUBCLASS, NAME) VALUES ( method_ID, -1, -2, 'com.ibm.commerce.order.calculation.FastShippingCalculationRuleCombineCmd', 'Sample CalculationRuleCombine method for shipping to improve performance', 5, 'FastShippingCalculationCodeCombine')
Get the original value of STENCALUSG.ACTRC_CALMETHOD_ID, using SQL. For example: SELECT ACTRC_CALMETHOD_ID FROM STENCALUSG WHERE CALUSAGE_ID=-2Record this value, in case we want to later disable this command.
Update the shipping configuration in the STENCALUSG table to refer to this calculation method. For example: UPDATE STENCALUSG SET ACTRC_CALMETHOD_ID= method_ID WHERE CALUSAGE_ID=-2
Update the Commerce Commands registry
To disable the optimized shipping calculation command:
- Get the original value found in step 2 of the enablement procedure.
- Update the shipping configuration in the STENCALUSG table to refer to this calculation method. For example:
UPDATE STENCALUSG SET ACTRC_CALMETHOD_ID= original_method_ID WHERE CALUSAGE_ID=-2
- Update the Commerce Commands registry.