Basic how-to
Generic integration how-to provides steps to connect any e-commerce platform to Firework player shopping tools.
You need to import products to Firework business portal before you can start shopping Integration. Please refer to this section to read more about this
Firework player emits custom javascript events whenever appropriate to ask for product details or inform about updates. Its up to storefront maintainer to react on any event and provide feedback using event actions. Firework player does not keep any state, rather ask for updates via events. The product and product units within Firework are expected to have external ids associated with the identifiers from the storefront maintainer.
document.addEventListener('fw:shopping:hydrate-products', async event => {
const { products, video, actions } = event.detail
})
Triggered when player loads and detects any integration based on
_fwnStoreFront
object. Cart hydration is important to provide details on products already in user's cart so player can mirror current cart state (products, coupons and quantities).document.addEventListener('fw:shopping:hydrate-cart', async (event) => {
const { actions } = event.detail
}
Event triggered when user changes cart content from within player either by adding, removing or updating product (variant) quantity. Variants in Firework terminology are units. Intent here is to let storefront know its suppose to update certail cart item quantity.
document.addEventListener('fw:shopping:cart-updated', async (event) => {
const { product, product_unit, quantity } = event.detail
})
Last modified 1yr ago