Hi,
I’ve implemented the BIS feature for my shopify store and it’s great. (https://help.klaviyo.com/hc/en-us/articles/360001895651)
Management have asked if the form can trigger whenever someone clicks an out-of-stock variant input, though. Out-of-the-box, the klaviyo BIS component changes the add to cart button into a ‘notify me’ button. Users have to then click this to show the form.
Is there anyway to rig the component to show the form when an out of stock size is clicked?
I have tried:
jQuery("div.product-form__controls-group input.disabled").on("click", function(){
setTimeout(function(){ jQuery("a.klaviyo-bis-trigger").first().trigger("click"); }, 500);
});
...and variations on this, and although console.log shows that a click event fires, nothing happens, so clearly it’s not a click event on the button that triggers the form. Hoping someone will say something like, ‘yeah, just invoke the klaviyo-bis.showForm() man, job done!’
Many thanks,
G