Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Full size image on product details page
New Landing › How can we help? › Atelier › Full size image on product details page
- This topic has 7 replies, 3 voices, and was last updated 8 years by Swift Ideas – Ed.
-
Posted in: Atelier
-
March 15, 2016 at 2:32 pm #255562
Hello,
I have o problem in product page: the featured image of product is displayed at full size. I was expected that the size values entered in woocommerce/settings/products/dispay/images will be used by theme’s templates
My objective is to display the image with the dimensions set in woocommerce product section
I searched into source codes and I found the following:
+ in /public_html/wp-content/themes/atelier/woocommerce/single-product/product-image.php:
$image_link = wp_get_attachment_url( $image_id, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) );
doesn’t return the version of image corresponding to woocommerce product details page (see above) but the full image url
+ in /public_html/wp-content/themes/atelier/woocommerce/single-product/product-image.php:
echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-data-rel="ilightbox[product]">%s</a>', $image_link, $image_caption, $image_html ), $post->ID );
took me to function sf_atelier_single_product_image_html( $html, $post_ID ) which return the html of image in product details page. But again,
$image_link = wp_get_attachment_url( $image_id, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) );
return the full image url not the url of image with proper dimensions set in woocommerce admin sectionThese means that the filter
'single_product_large_thumbnail_size'
doesn’t work, or return the ‘full’ size of image.This means that in product page I can’t display an image with the dimensions set in woocommerce section as mentioned above.
Please help me to solve this.
I’ll appreciate your answer
Traian
March 15, 2016 at 2:37 pm #255566Second: The image displayed in lightox in product details page is the full version of image. How I could set another image size for that lightbox?
I’ll appreciate any suggestion that solve this
Thanks
March 17, 2016 at 2:23 pm #256089Hello,
1. Please help me to display image in product page at right dimensions (set in woocommerce admin section): http://www.verragamo.com/product/decorative-antique-green-vase-set/
info: main image url: http://www.verragamo.com/wp-content/uploads/2016/03/gifts-valentines-decorative-antique-green-vase-set.jpg
size: 1280 x 854Info: I set w:540px h:700px but the main product image is displayed at full size (1280 x 854)
2. Please help me to display correct the images in product image gallery. When click on thumbnail image, the bog image will display with errors: http://www.verragamo.com/product/decorative-antique-green-vase-set/
3. 2 images in category page are displayed one over another:
http://www.verragamo.com/product-category/sets/
I’ll appreciate any suggestion which lead me to solve these big issues
Mahmoud
March 18, 2016 at 9:09 am #256248Still waiting for suggestions…
This theme is full of bugs.
I need help with the above details
Thank you!
March 21, 2016 at 11:34 am #256677Hi,
Let me run this past the lead developer, parts of the above code are overwritten by a function called
sf_atelier_single_product_image_html
andsf_atelier_single_product_image_thumbnail_html
.Both of those contain filters with image size options, however a size is not returned currently for me locally.
Thanks.
March 21, 2016 at 2:20 pm #256776Hi @Mahmoud
The theme is not “full of bugs” – WooCommerce have completely changed their setup on this, and they no longer use that filter to set the image size based on the size you have set in your options. Our code was working fine with this until they changed that. We are looking at their recent changes now and will provide a compatibility update for this asap.
– Ed
March 21, 2016 at 2:41 pm #256797In regards to your questions.
2) What errors – can you provide more information?
3) The first images you see do not meet the size requirement you have set in your WC options – this is not a bug.
– Ed
March 21, 2016 at 3:18 pm #256818@Mahmoud – have re-worked the theme to work with the latest srcset setup that WooCommerce uses, will be pushing an update in the next 24 hours.
– Ed
-
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.