Latest version of Covet.pics Widget is published on NPM - https://www.npmjs.com/package/@covet-pics/covet-pics-widget
To start using widget, you need to link to main widget JS file:
After that, you can use the element anywhere in your template, JSX, html etc.
Typical usage would be to render a gallery. For this you need to know Gallery Embed ID. For eg. this is what embed code markup would look like:
After component is loaded, markup could look like this (if it's grid layout):
Methods are actions done by Covet.pics Widget instances.
Opens popup, takes popupId as a param.
Opens upload modal where user can upload their photos
Events triggered by Covet.pics Widget instances. You can use this to customize behaviour
Triggered after Covet.pics Widget has been loaded. Event emmits Gallery ID, count of items in gallery and element where gallery is embedded.
Triggered after modal is opened
Triggered after modal is closed
Triggered after modal is changed (when user clicks on previous/next button)
Triggered after customer adds Product to cart in Covet.pics modal. Event detail contains information about product: variantId and productId