Home › Forums › WoodMart support forum › Quick view and Tag manager
Quick view and Tag manager
- This topic has 13 replies, 2 voices, and was last updated 6 years ago by
Artem Temos.
-
AuthorPosts
-
February 19, 2019 at 5:40 pm #108443
betgParticipantHello,
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();
});February 19, 2019 at 8:25 pm #108478
Artem TemosKeymasterHi,
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
February 20, 2019 at 3:19 pm #108702
betgParticipantThanks 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 themeFebruary 20, 2019 at 3:24 pm #108703
Artem TemosKeymasterYou can copy the whole PHP function that contains this button to the child theme’s functions.php file to override it.
February 21, 2019 at 4:34 pm #108990
betgParticipantHi ,
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
February 21, 2019 at 4:46 pm #108993
Artem TemosKeymasterActually, 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.February 22, 2019 at 12:46 pm #109138
betgParticipantSadly not 🙁
It’s working only on the quick view icon, click on image or title redirect me to the product pageFebruary 22, 2019 at 1:11 pm #109147
Artem TemosKeymasterSo the code we gave you earlier doesn’t work now? Or it didn’t work before as well?
February 22, 2019 at 3:22 pm #109235
betgParticipantHo 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.February 22, 2019 at 3:33 pm #109240
Artem TemosKeymasterBut as we can see here https://efamileat.instance-dev-betg.fr/ the title and image already open the quick view on click.
February 25, 2019 at 1:47 pm #109682
betgParticipantYes 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).
February 25, 2019 at 3:56 pm #109718
Artem TemosKeymasterPlease, 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.
March 4, 2019 at 3:15 pm #110839
betgParticipantHi,
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,
March 4, 2019 at 3:43 pm #110843
Artem TemosKeymasterOK, contact us if you will have any questions.
-
AuthorPosts
The topic ‘Quick view and Tag manager’ is closed to new replies.
- You must be logged in to create new topics. Login / Register