Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #784443

    Hi there
    On my single product page layout, when you click on the product gallery image it does not open the thumbnail image in lightbox you click on, it starts from the beginning.

    Is there a way to fix this?

    I have the latest Enfold, WordPress and WooCommerce installed with @mensmaximus awesome fix in my child-theme functions.php.
    =======================

    Image Fix MensMaximus

    /*
    	Woocommerce 3.0.0 Compatibility Fix
    	Remove Enfold's custom functions that conflict with the new image display in WooCommerce 3.0.0
    */
    global $woocommerce;
    
    if( version_compare( $woocommerce->version, '3.0.0', ">=" ) ) {
    
    	add_theme_support( 'wc-product-gallery-zoom' );
    	add_theme_support( 'wc-product-gallery-lightbox' );
    
    	function avia_woocommerce_gallery_thumbnail_description($img, $attachment_id, $post_id, $image_class ) {
    	    return $img;
    	}
    	function avia_woocommerce_post_thumbnail_description($img, $post_id){
    	    return $img;
    	}
    
    }

    and for style

    .woocommerce-product-gallery__trigger{
        position: absolute !important;
        top: 1em;
        left: 1em;
        z-index: 99;
    }

    Some help will be much appreciated.
    If you can.
    Thanks.

    • This topic was modified 7 years, 6 months ago by waveshaper.
    #784496

    @waveshaper this is an issue I described here in German.

    The issue stems from the fact woocommerce 3 adds the main image to the thumbnails. Enfold does it the WooCommerce 2.4.16 way without the main image in thumbnails. Therefroe the array of images is missing one image and the WooCommerce 3 lighbox fetches always the image before the one you click on. Unfortunately there is no way to modify this behavior with a monkey patch for the WooCommerce script. I would have posted one if it would be possible.

    #784504

    @mensmaximus thank you so much for clearing this up, hopefully the next enfold release will fix this.
    Well currently I am running all the latest versions, Enfold, WooCommerce and WordPress.
    Situation I have is the spaces between my thumbnails, I created a separate post for this but have had no replies.
    What do you think? Have you come across a situation like this , see product gallery –
    Single Product Layout Gallery
    No rush, when you have a moment.
    Appreciate it.
    Thanks

    • This reply was modified 7 years, 6 months ago by waveshaper.
    #784511

    @waveshaper as you can see four images are larger (123.5 px) than the rest (113.5 px). Without deeper analysis I would guess you have changed the thumbnail size some time ago but did not rebuild the thumbnails. This would be a possible reason.

    #784522

    @mensmaximus Thank you for taking the time.

    Strange, its the same with a number of the products, and only after the update.

    Perhaps rebuild images? The images I uploaded are 450px X 450px and the main image is 900 X 900.

    I will further investigate and reply to this thread tagging you if that is ok.

    Cheers

    • This reply was modified 7 years, 6 months ago by waveshaper.
    #784525

    Don’t rebuild until you know the issue stems from the image sizes!

    #784528

    Cheers, I will certainly not! Thanks for the heads up :)

    #784703

    @mensmaximus You are right! It is the image sizes, plus I was using LiteSpeed Cache plugin which I disabled, uploaded new size images and it works.
    Thank you for all your assistance and expertise, it REALLY helps a lot.
    Keep up the excellent work man.
    Cheers

    #785256

    Hi waveshaper,

    Glad you got it resolved.


    @mensmaximus
    Thank you for your help :)

    Best regards,
    Victoria

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