i want to stop buy it now button from redirecting and execute some code and afterwards retrigger the buy it now functionnality
i have used preventDefault but it i not working
nothing is showing in console and when i click the button it redirects to checkout page
e.preventDefault() would work on some cases, but not on others.
Instead of preventDefault() try with:
Hope that would help!
hy i have checked this code also, but it is not working.
the click event is firing and i can see log statement but it still redirects to checkout page.
there are some ajax requests also that are being sent by this button one of them is