Home Forums WoodMart support forum Quick view and Tag manager

Quick view and Tag manager

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #108443

    betg
    Participant

    Hello,

    Quick view has some trouble with the tag manager plugin (https://wordpress.org/plugins/duracelltomi-google-tag-manager/) : Quick view is displayed but you are redirected to the product page.

    The creator of the tag manager plugin explained the solution : adding a class “quick-view-button” to the quick view link (explained here : https://wordpress.org/support/topic/enhanced-e-commerce-conflict-with-quickview/)

    We don’t know how to do it properly in the child theme, could you help us ?

    Note that we’ve also added a little modification to our JS to add the “quick view effect” on both image & title of the homepage, so the class also add to be applied here.

    The code is :
    jQuery(‘.home .product-grid-item .product-image-link, .home .product-grid-item .product-title’).click(function(e) {
    e.preventDefault();
    jQuery(this).parents(‘.product-grid-item’).find(‘.open-quick-view’).click();
    });

    #108478

    Artem Temos
    Keymaster

    Hi,

    You can find and modify the code for this button in the file woodmart/src/master/inc/integrations/woocommerce/modules/quick-view.php

    Kind Regards

    #108702

    betg
    Participant

    Thanks for the feedback.
    We found where the file was in the theme folder.
    The thing is we would like to do it in the theme child to avoir loosing those modifications after an update, and we can’t figure out how to do this function in the child theme

    #108703

    Artem Temos
    Keymaster

    You can copy the whole PHP function that contains this button to the child theme’s functions.php file to override it.

    #108990

    betg
    Participant

    Hi ,

    thanks for your feedback.
    It’s working for the quick view icon.
    But the classe is not applied to the other quickview links (on title / image of products displayed on the homepage , thanks to this code :

    jQuery(‘.home .product-grid-item .product-image-link, .home .product-grid-item .product-title’).click(function(e) {
    e.preventDefault();
    jQuery(this).parents(‘.product-grid-item’).find(‘.open-quick-view’).click();
    });

    How can i manage to add the class “quick-view-button” to those links too ?

    (As you can see on the website

    #108993

    Artem Temos
    Keymaster

    Actually, these links just trigger click on the quick view button. It should work only when you add your custom class to open-quick-view element.

    #109138

    betg
    Participant

    Sadly not 🙁
    It’s working only on the quick view icon, click on image or title redirect me to the product page

    #109147

    Artem Temos
    Keymaster

    So the code we gave you earlier doesn’t work now? Or it didn’t work before as well?

    #109235

    betg
    Participant

    Ho nono the code is working fine as you can see on our staging environment.
    It’s the same configuration as live excepte the tag manager.

    We successfully added the additional class for the live environment but only on the quickview icone.
    The Title / picture still has the bug where the quick view displays for 1/2 second and we are redirected to product detail page.

    The expected behavior for product title and picture : open quickview on click.

    As the developer of the plugin tag manager said, adding the class “quick-view-button” seems to correct the bug with quickview.
    We just don’t know where to add the additional class “quick-view-button” on the product title and picture.

    Attachments:
    You must be logged in to view attached files.
    #109240

    Artem Temos
    Keymaster

    But as we can see here https://efamileat.instance-dev-betg.fr/ the title and image already open the quick view on click.

    #109682

    betg
    Participant

    Yes indeed, because the tag manager plugin (https://wordpress.org/plugins/duracelltomi-google-tag-manager/) is not installed on the staging environment, only on production (see link below).

    #109718

    Artem Temos
    Keymaster

    Please, create this setup on one website (on staging) where we can reproduce the problem. We are a bit confused and don’t understand the issue.

    #110839

    betg
    Participant

    Hi,

    We managed to overwrite a woocommerce function in the child theme to add the class we needed.

    Thanks for your support, you can close this ticket.

    Best,

    #110843

    Artem Temos
    Keymaster

    OK, contact us if you will have any questions.

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

The topic ‘Quick view and Tag manager’ is closed to new replies.