Any custom javascript events that our app emits will be documented here for developer reference. Please reach out to support with any requests. The event will be dispatched on the document object unless otherwise noted below.
shopacado:cart:update
We update discount information by applying attributes to the cart via the cart ajax api on the storefront. This event fires once we receive a successful response from our ajax POST request to /cart/update.js.
document.dispatchEvent(
new CustomEvent("shopacado:cart:update", {
detail: {
cart: cartUpdateJSONResponse,
},
})
);
shopacado:cart:render:messaging
When we update the messaging, such as the upsell and success messages for your discount offers, we will fire this event once the messaging has been added to the page. This does not trigger when discounts are updated. See shopacado:cart:update above.
document.dispatchEvent(
new CustomEvent("shopacado:cart:render:messaging")
);
....