Constructor
new WebstoreComponents(confignullable)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
config |
WebstoreComponents.config |
<nullable> |
null | Configuration object. |
Example
let webstore = new window.PSS.WebstoreComponents();
webstore.mountStore('div#app');
Classes
Methods
mountCartIcon()
Mount a small floating shopping cart icon.
mountFeatureGroup(featureGroupName, selector)
Mount a group of featured products
Parameters:
Name | Type | Description |
---|---|---|
featureGroupName |
string | The name of the feature group the user has created in the PSS Dashboard |
selector |
string | Element | The destination `Element` this component should be rendered within |
Example
webstore.mountFeatureGroup('AFX Helmets', 'div#some-container');
mountStore(selector)
Mount the *entire* webstore application in `selector`.
Parameters:
Name | Type | Description |
---|---|---|
selector |
string | The DOM target this component should be mounted in to. |