-
Author
-
December 21, 2015 at 11:00 #94502McNiteflyParticipant
Dear Kleo Support,
I’m having an issue with the WooCommerce product pictures on Single Product Pages.
I cannot chose another picture from the choice of images below the big product picture. I can scroll through the list of pics – but I cannot click an image to be shown big.
The problem appeared with the update to WP 4.4.
I have also created a staging copy of the installation, where I have deactivated all plugins but Woocommerce. The problem persists.
I also notice that the preview thumbs below the big product picture are greyed out. It has been like that before the update to 4.4, already, but there I was able to click and choose them. Do you have an idea where this greying out comes from?
Could you please have a look if you can find the reason for the error?
Thanks a lot for your help,
Tom
December 21, 2015 at 16:11 #94549sharmstrModeratorThe choosing thumbnail issue has already been fixed and will be available in the next update. Until then, do the following to fix.
Add the following function to the very bottom of /kleo/kleo-framework/lib/function-core.php
COPY CODEif ( ! function_exists( 'sq_remove_img_srcset' ) ) { function sq_remove_img_srcset( $attr ) { if (! empty($attr)) { unset($attr['srcset']); unset($attr['sizes']); } return $attr; } }
In /kleo/woocommerce/single-product/product-image.php replace the following lines
COPY CODE$image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) ); $image_link = wp_get_attachment_url( get_post_thumbnail_id() ); $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array( 'title' => $image_title ) ); $attachment_count = count( $product->get_gallery_attachment_ids() );
with this
COPY CODE$image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) ); $image_link = wp_get_attachment_url( get_post_thumbnail_id() ); add_filter( 'wp_get_attachment_image_attributes', 'sq_remove_img_srcset'); $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array( 'title' => $image_title ) ); remove_filter( 'wp_get_attachment_image_attributes', 'sq_remove_img_srcset'); $attachment_count = count( $product->get_gallery_attachment_ids() );
I’m not seeing greyed out thumbnails on your site. Once the carousel finishes loading, the images look fine.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.