Order Calculation

Customer Service Center uses the same order calculation routines for pricing, taxes, shipping charges, and promotions as B2C Commerce. The current SiteGenesis application contains a registration for basket (order) calculation. The calculation logic location depends on the version of SiteGenesis Storefront Core cartridge used by the B2C Commerce site.

If you're using the current SiteGenesis version, the calculation logic is located in the hook and the script calls:

dw.system.HookMgr.callHook( "dw.ocapi.shop.basket.calculate", "calculate", pdict.Basket ); 

If you're using an older version of SiteGenesis, you register the calculate hook to call the CalculateCart.ds file.

{  
     "hooks": [  
          {"name": "dw.ocapi.shop.basket.calculate", "script": "./cart/CalculateCart.ds"}  
     ]  
}

See dw.order/hooks in the Infocenter's B2C Commerce Scripts main topic.

Related Links

Customer Service Center

Customer Service Center Customization

Customer Service Center Hooks