Script Programming

This document describes how to 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 Rhino JavaScript. This includes ECMAScript 5, Mozilla extensions up to JavaScript 1.8 and E4X.

In addition B2C Commerce supports:
  • optional type specification support from JavaScript 2.0/ECMA 4th edition proposal and ActionScript.
  • ECMAScript 5 compatibility fix for the global parseInt(String) function
B2C Commerce also reproduces a few nonstandard behaviors for older compatibility modes.
	var a: String
	var p: dw.catalog.Product

If you are unfamiliar with JavaScript, read "JavaScript: The Definitive Guide," from O'Reilly for a good introduction to the JavaScript language.