Clicking on links inside product items, redirect to product page
-
Hey!
There’s an issue with links within the product item (such as Wishlist or Quickview etc,) which redirect to product page even though they’re explicitly set to prevent this.
Looking throughout the code, seems like the click event is set inside
gtm4wp-woocommerce-enhanced.jsaround line 463 ex: https://d.pr/i/r1sBML .I suggest adding a check in the code to avoid these kind of conflicts eg:
if( event.isDefaultPrevented() ) { return; }More on this here https://api.jquery.com/event.isdefaultprevented/ .
This will ensure that these kinds of buttons that use Ajax or just have a static event, should be ignored.
Thanks and Happy holidays!
The topic ‘Clicking on links inside product items, redirect to product page’ is closed to new replies.