-
AuthorPosts
-
May 4, 2018 at 5:35 am #951294
Hi,
We have “Woocommerce 3.0 Product Gallery” selected under “Shop Options”.
Our normal process for products is, add first image to “Product image” section, add rest of images to “Product gallery” section.My issue is if I have a product with only 1 image, I add the image to the “Product image” section, save and then view the product, I can’t click the magnifying glass to go into the Lightbox.
Does it on every product with 1 image. Checked js console, no errors. Tried in different browsers, different computers.
Every product with an image in the “Product Gallery” it works fine.Any ideas? .
May 6, 2018 at 7:22 pm #952358Hey isa_solutions,
I think that if you do fix the SSL issue / error the problem will be solved.
Could you give it a try?Best regards,
BasilisMay 7, 2018 at 12:01 am #952408I renewed the certificate but that didn’t seem to fix it
May 8, 2018 at 12:08 pm #953324Hi,
Thank you for the update.
Edit the config-woocommerce > woocommerce-mod.js file. Look for this code and then remove it.
//make woocommerce 3.6 gallery search icon clickable and open lightbox jQuery( 'body.single-product' ).on( 'click', '.single-product-main-image .avia-wc-30-product-gallery-lightbox', function( e ){ e.preventDefault(); var clicked = $(this), container = clicked.parents('.single-product-main-image'); container.find('.flex-active-slide a.lightbox-added').eq(0).trigger('click'); });
Let us know if it works.
Best regards,
IsmaelMay 9, 2018 at 11:30 pm #954220Thanks for the reply.
The weirdest thing is I looked for that code and couldn’t find it!
So I added it in and it started working.No one has ever edited this file so wondering how it vanished? Was this removed in 4.2.6? WIll it also be removed if I upgrade to 4.3.1?
Any other ideas as it still doesn’t work if I add that code in or remove it- This reply was modified 6 years, 7 months ago by isa_solutions.
May 10, 2018 at 11:36 pm #954929Further to my last message. I was editing a wrong version of site in another directory. So I found the code, removed it and reloaded page (cleared cache) but still nothing happens. With it removed it also stops working on products with multiple images. If the js code is in there I can see it is getting triggered but nothing happens.
May 10, 2018 at 11:44 pm #954932Did some more js debugging and found the issue:
in the last line of your code
container.find('.flex-active-slide a.lightbox-added').eq(0).trigger('click');
the find doesn’t find anything beause of the .flex-active-slide. If I remove that it works. So this is how it now looks:
//make woocommerce 3.6 gallery search icon clickable and open lightbox jQuery( 'body.single-product' ).on( 'click', '.single-product-main-image .avia-wc-30-product-gallery-lightbox', function( e ){ e.preventDefault(); var clicked = $(this), container = clicked.parents('.single-product-main-image'); container.find('a.lightbox-added').eq(0).trigger('click');//changed .flex-active-slide a.lightbox-added' to a.lightbox-added });
Are other people having this issue? Can this me merged into the enfold code so I don’t have to keep updateing this after each update. Thanks
May 11, 2018 at 11:04 am #955171 -
AuthorPosts
- You must be logged in to reply to this topic.