Public methods

Most of the public methods we had in Snipcart's v1.0 have been moved to the Public API. We suggest you take a look at this documentation section for everything related to the cart, items and products.

title: Public methods, JavaScript API description: "See our three JavaScript API public methods."

tags: "public methods, javascript api"

bind

This method is used to bind to Snipcart events. Click here to get more information about Snipcart events.

Usage

Snipcart.execute('bind', '{eventName}', callback);

unbind

This method is used to unbind from events that you previously subscribed to with the bind method.

Usage

Snipcart.execute('unbind', '{eventName}');

registerLocale

This method is used to register a new locale or to alter specific resources. Take a look at our localization section about this for more information.

Usage

Snipcart.execute('registerLocale', 'en', {
yes:
"Yes",
no:
"No",
...
})