Hi there!
I’m trying to intercept the Add to cart functionality on the product page. Thing is, I need to check if the personalisation from the Kings options & variants App have been added, and trigger some functionality depending on that.
The functionality itself is resolved, but I can’t prevent the default behavior when clicking on the add to cart button (adding the products and redirecting)
I investigated for a while, but I couldn’t find the right code to intercept this functionality. I tried doing that on product-form.js, but even though I commented out all the event listeners there, the functionality continued to happen.
At the moment I just hide the original button, and created a ‘fake’ one. Then I manage to click the original button directly on my js logic, but I don’t love this approach.
I would really appreciate if some one could point me on the right direction.
Thank you in advance!
