Support » Plugins and Hacks » WooCommerce » woocommerce change lightbox, enable for product gallery thumbnails

Viewing 2 replies - 1 through 2 (of 2 total)
  • I partially solved this but nowI can not edit my first psot so here is my added progress and a new question….

    I did the same for thing basically in product-thumbnails.php and it works for the thumbnailed images. (code explained below in case its of use to others)

    It is not quite right.
    Say I have a main image and 3 thumbnails. Clicking any one should launch the lightbox with 4 images, the main one and 3 thumbnails.
    The problem is that clicking main just shows main in the lightbox, clicking a thumbnail just the 3 from the thumbnail gallery.

    What else do I need to do to make that work?
    Also in the linked post above Roy says “Thanks for contributing and helping others. However I would suggest you don’t even copy the template file but instead use the filters you already see there”
    I can not figure out how to do it that way.

    Code I changed in “product-thumbnails.php” follow instructions in post linked above to make a copy of the file. Then replace

    echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<a href="%s" title="%s" rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image ), $attachment_id, $post->ID, $image_class

    With

    echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<a href="%s" class="%s" title="%s" rel=“lightbox[]">%s</a>', $image_link, $image_class, $image_title, $image ), $attachment_id, $post->ID, $image_class );

    but its not working for gallery images of lightbox in single product page image and there is slider arrow are also not showing.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘woocommerce change lightbox, enable for product gallery thumbnails’ is closed to new replies.