Home Forums WoodMart support forum Quick View Exception

Quick View Exception

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #331256

    MarkusT
    Participant

    Hi!

    I have currently implemented my website so that when clicked on product, it opens the quick view page instead of the product page, using the following custom JS:

    jQuery('.product-image-link, .product-element-bottom').on('click', function(e) {
        e.preventDefault();
        jQuery(this).parents('.product-grid-item').find('.open-quick-view').click();
    });

    Now, for one product (https://test.ronimisministeerium.ee/tartu/toode/kinkekaart/), I need that the actual product page is opened instead of the quick view. How could I achieve that?

    Markus

    #331480

    Luke Nielsen
    Keymaster

    Hello,

    Please, try to use this code to open the product page instead of the quick view.

    jQuery('.product-image-link, .product-element-bottom').on('click', function(e) {
    	
    	if ( ! jQuery(this).parents('.product-grid-item').hasClass('post-1767') ) {
    		e.preventDefault();
    		jQuery(this).parents('.product-grid-item').find('.open-quick-view').click();
    	}
    });

    To be able to add this feature to another separate product, just replace the ID of the product after the “post-” value in the “hasClass” method.

    https://prnt.sc/1zass8e

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)