Overview:
Here are the 3 Callbacks which we offer for the Product Accessories app.
Please keep in mind that a knowledge of Javascript is necessary in order to use these Callbacks.
We do not support custom code, but are happy to offer our development services.
Manually load Accessories
{{ 'https://accessories.w3apps.co/js/accessories.js' | script_tag }}
<script type="text/javascript">
if (Shopify.designMode != true){
accessoriesJS($);
}
</script>
It will be required that you manually load our js file and fire the accessoriesJS function on your theme with the above snippet in order to ensure that these callbacks will work.
Accessory Item Added Callback:
function accessoryItemAddedCallback(div, product) {
console.log(div);
console.log(product);
}
This Callback is fired each time an Accessory item (Individual Accessory Product) is loaded on the page.
Accessories Done Loading Callback:
function accessoriesDoneLoadingCallback() {
console.log("Accessories loaded.");
}
This Callback is fired once all of the Accessory items (Individual Accessory Products) have been loaded on the page, and the app has completed loading entirely.
Accessories Price Change Callback:
function accessoryItemPriceChangedCallback(select, product, price) {
console.log(select);
console.log(product);
console.log(price);
}
This Callback is fired when the price of an item is changed when selecting the variant.
Accessories QuickView Callback:
function accessoriesQuickViewCallback(divModal, product){
console.log(divModal);
console.log(product);
}
This Callback is fired each time someone clicks on the "Quick View" link on the Product Image, and the Quick View window is opened.