Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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? .

    #952358

    Hey 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,
    Basilis

    #952408

    I renewed the certificate but that didn’t seem to fix it

    #953324

    Hi,

    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,
    Ismael

    #954220

    Thanks 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, 6 months ago by isa_solutions.
    #954929

    Further 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.

    #954932

    Did 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

    #955171

    Hi,

    Thanks for the update. I’m glad that you found the issue. We’ll let the development team know. For now, please keep the modifications.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.