Anyone know how to make it so that when you click the image on the Product Archive page of a External/Affiliate product that the link will open in a popup exactly like it does when you click the button below the image. Currently when you click the image it goes to the product page.
I searched everywhere I could but I could not find how to do this.
Here is my site if you want to see what I mean. Please help!
http://danielo79.sg-host.com/product-category/uncategorized/
CodePudding user response:
Where would I put that code? @J u a N
CodePudding user response:
Could you try this jQuery function:
jQuery( document ).ready( function( $ ) {
$( 'li.product.product-type-external' ).each( function() {
if ( $( this ).find( 'a.button' ).hasClass( 'product_type_external' ) ) {
$( this ).find( 'a:not(.product_type_external)' ).attr( 'href', $( this ).find( 'a.button.product_type_external' ).attr( 'href' ) );
}
} );
} );