SiteGenesis JavaScript Controller (SGJC) Cart Calculation

The SiteGenesis application uses the Open Commerce API cart so that OCAPI applications (such as DSS) can use the SiteGenesis pipelines without having to reconcile two separate carts.

The calculate cart functions are located in a JavaScript module, calculate.js, which is referenced (via the OCAPI hook mechanism) by the CalculateCart.ds script file. You can use OCAPI for any customization or link integration done in the script version of calculate cart.

Note: Prior to Release 15.1, there were two versions of CalculateCart, a Salesforce B2C Commerce script version (js) and an OCAPI version (java).

Cart Pipeline

The Cart.xml pipeline processes the cart, which shows promotions along with any prices. The Cart-Calculate subpipeline calls the cart/CalculateCart.ds script before returning to the calling subpipeline. If the basket is null, a new basket is created using GetBasket. This pipeline includes a private start node (Calculate), a call node (Cart-GetExistingBasket), two pipelets (Assign and Script) and two end nodes. The Script pipelet executes the cart/CalculateCart.ds script file.

For more information about the cart calculation hook, see the current version of the OCAPI documentation.

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.