Script Programming

Use B2C Commerce JavaScript to customize your ecommerce storefront application.

For details on specific B2C Commerce Script API, see the B2C Commerce API documentation.

Industry Standards

B2C Commerce JavaScript is based on Rhino JavaScript. Multiple language versions are supported. The active compatibility mode determines the language version. Compatibility modes earlier than 21.2 use the ECMAScript 5 language version. Compatibility modes 21.2 or later enable the latest language version that includes some ECMAScript 6 constructs. See Compatibility Mode Changes for details.

B2C Commerce supports the following:
  • Mozilla extensions up to JavaScript 1.8
  • ECMAScript for XML (E4X)
  • Optional type specification support from JavaScript 2.0/ECMA 4th edition proposal and ActionScript, as in the following examples:
    • let a: String;
    • let p: dw.catalog.Product;
  • Nonstandard behavior for older compatibility modes.
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.