Why is the cart drawer not updated?

If the cart drawer or slide cart is not updated after a bundle is built, it's because the cart drawer cannot detect the add-bundle-to-cart activity. Also, there is no unified way for us to update the cart drawer manually.

You can use our callback, afterBYOBAddtoCart to manually trigger a cart drawer update, e.g. This is the code to integrate with the Prestige theme by Maestrooo

<script>
function afterBYOBAddtoCart(variants, variant_id) {
console.log('refresh cart drawer in addVariantToBundle');
document.documentElement.dispatchEvent(new CustomEvent('cart:refresh', {
bubbles: true
}));
}
</script>

You can add the code in a custom liquid section and put it via Change Design => byob product template => before the BYOB app blocks

Reference: 

https://support.maestrooo.com/article/304-technical-javascript-events-exposed-by-the-theme

Still need help? Contact Us Contact Us