SubblyCart.js widget
Configure the widget
window.subblyConfig takes a dozen keys. Five of them cover most first
integrations:
apiKey: your Storefront API key. The only required key.languageCode: a two-letter language. Without it, the widget takes thelangquery parameter, then thelangattribute of<html>, then the browser's language.settings: the page hooks — which links the widget catches, which element opens it, which element shows the item count. See Wire it into your page.init: set it tofalseto boot the widget yourself.checkoutUrl: a page on your site that owns the checkout. The widget sends the customer there and stands down on that path.
A typical config
Boot the widget by hand
With init: false, the loader sets no global. Call
SubblyCart.initialize yourself
and keep the instance it returns:
Boot the widget by hand
Every key, with its type and default, is on
Configuration keys.
SubblyCart.initialize(config)
takes the same object, and you can change the URL keys later with
configure.
Last modified on