What's New
Tagged: cover image
- AuthorPosts
Hello,
I have on product pages with attributes, set main pic. But on the category list and featured, it will show the picture from the first attribute and not the main picture, is there a setting for this?
On de back-office is will show on the product list all the main image.
How can this be done in the front?on mine old shop with Prestashop 1.6 it wil shown on all list the main pic. so wy do you set the main pic. for.
best regard,
FrankHello,
I found this..
https://www.sunnytoo.com/17139/prestashop-1-7-shows-wrong-cover-images-products
I am not the only one i see.
Is there a way to get this done?
this will help a lot of Prestashop 1.7 users.best regard,
FrankHello,
no that make no sense, the cover image is not the default combination. the cover image let show all the combinations.
see als this link…this is what the problem is.
can it be made like it should be?
bet regards,
FrankHi,
If there is a combination, Prestashop will show the default combination image on the front office instead of your cover image, see attached screenshots. if you want to show the cover image, you can select it as the default combination image. on the homepage, category pages, and brand pages, if you click the “Add to cart” button, that will add the default combination to the cart, so showing the default combination image is the correct logic.
Best regards.Attachments:
No this is not logic!
A cover image is the image that shown all the combinations, a default combination is one product with his image, like it is in Prestashow 1.6 that is logic, so Prestashop 1.7 is not logic.
As you can read it on your blog it should not work like that.
Mine question is can you made it like Prestashop 1.6 it handled?best regard,
FrankHi,
see also..
https://github.com/PrestaShop/PrestaShop/issues/12429
and
https://github.com/PrestaShop/PrestaShop/issues/12241
and
https://github.com/PrestaShop/PrestaShop/issues/12726i am not the first one, Hope that Prestashop will implement this soon.
best regards
FrankHello yobo,
It is open source, if you can fix this maybe you can submits the pull request on.
https://github.com/PrestaShop/PrestaShop/issues/12241
Then the hole Prestshop community is happy with your skills.best regards,
FrankHi,
1. Please modify the \themes\transformer\templates\catalog\_partials\miniatures\tm-slider.tpl file:
changeclass="tm_gallery_item {if $tm_lazyload} swiper-lazy {/if}" {if $tm_lazyload}data-src{else}src{/if}="{if $tm_thumbs}{$image.bySize.small_default.url}{else}{$image.bySize.{$pro_image_type}.url}{/if}" {if $sttheme.retina && (($tm_thumbs && isset($image.bySize.small_default_2x.url)) || (!$tm_thumbs && isset($image.bySize.{$pro_image_type_retina}.url)))} {if $tm_lazyload}data-srcset{else}srcset{/if}="{if $tm_thumbs}{$image.bySize.small_default_2x.url}{else}{$image.bySize.{$pro_image_type_retina}.url}{/if} 2x" {/if}
To
class="tm_gallery_item {if $tm_lazyload} swiper-lazy {/if}" {if $tm_lazyload}data-src{else}src{/if}="{if $tm_thumbs}{$image.bySize.small_default.url}{else}{$link->getImageLink($product.link_rewrite, $product.id_image, $pro_image_type)}{/if}" {if $sttheme.retina && (($tm_thumbs && isset($image.bySize.small_default_2x.url)) || (!$tm_thumbs && isset($image.bySize.{$pro_image_type_retina}.url)))} {if $tm_lazyload}data-srcset{else}srcset{/if}="{if $tm_thumbs}{$image.bySize.small_default_2x.url}{else}{$link->getImageLink($product.link_rewrite, $product.id_image, $pro_image_type_retina)}{/if} 2x" {/if}
See attached 1.png
2. Modify the \themes\transformer\templates\catalog\_partials\miniatures\product.tpl file:
Change{if $is_lazy}data-src{else}src{/if}="{if isset($product.cover.bySize.{$pro_image_type}.url) && $product.cover.bySize.{$pro_image_type}.url}{$product.cover.bySize.{$pro_image_type}.url}{elseif isset($urls.no_picture_image)}{$urls.no_picture_image.bySize.{$pro_image_type}.url}{else}{$sttheme.img_prod_url}{$sttheme.lang_iso_code}-default-{$pro_image_type}.jpg{/if}" {if $sttheme.retina && isset($product.cover.bySize.{$pro_image_type_retina}.url)} {if $is_lazy}data-srcset{else}srcset{/if}="{$product.cover.bySize.{$pro_image_type_retina}.url} 2x" {/if}
To
{if $is_lazy}data-src{else}src{/if}="{if isset($product.cover.bySize.{$pro_image_type}.url) && $product.cover.bySize.{$pro_image_type}.url}{$link->getImageLink($product.link_rewrite, $product.id_image, $pro_image_type)}{elseif isset($urls.no_picture_image)}{$urls.no_picture_image.bySize.{$pro_image_type}.url}{else}{$sttheme.img_prod_url}{$sttheme.lang_iso_code}-default-{$pro_image_type}.jpg{/if}" {if $sttheme.retina && isset($product.cover.bySize.{$pro_image_type_retina}.url)} {if $is_lazy}data-srcset{else}srcset{/if}="{$link->getImageLink($product.link_rewrite, $product.id_image, $pro_image_type_retina)} 2x" {/if}
See attached screenshot 2.png
Then clear the Smarty cache.
Best regards.Attachments:
Hi,
Please modify the \themes\transformer\templates\catalog\_partials\miniatures\product-slider-item-compact.tpl file:
Change
<img src="{if isset($product.cover.bySize.cart_default.url) && $product.cover.bySize.cart_default.url}{$product.cover.bySize.cart_default.url}{elseif isset($urls.no_picture_image)}{$urls.no_picture_image.bySize.cart_default.url}{else}{$sttheme.img_prod_url}{$sttheme.lang_iso_code}-default-cart_default.jpg{/if}" {if $sttheme.retina && isset($product.cover.bySize.cart_default_2x.url)} srcset="{$product.cover.bySize.cart_default_2x.url} 2x" {/if} width="{$product.cover.bySize.cart_default.width}" height="{$product.cover.bySize.cart_default.height}" alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" {if $sttheme.google_rich_snippets && (!isset($no_google_rich_snippets) || !$no_google_rich_snippets)} itemprop="image"{/if} />
To
<img src="{if isset($product.cover.bySize.cart_default.url) && $product.cover.bySize.cart_default.url}{$link->getImageLink($product.link_rewrite, $product.id_image, 'cart_default')}{elseif isset($urls.no_picture_image)}{$urls.no_picture_image.bySize.cart_default.url}{else}{$sttheme.img_prod_url}{$sttheme.lang_iso_code}-default-cart_default.jpg{/if}" {if $sttheme.retina && isset($product.cover.bySize.cart_default_2x.url)} srcset="{$link->getImageLink($product.link_rewrite, $product.id_image, 'cart_default_2x')} 2x" {/if} width="{$product.cover.bySize.cart_default.width}" height="{$product.cover.bySize.cart_default.height}" alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}" {if $sttheme.google_rich_snippets && (!isset($no_google_rich_snippets) || !$no_google_rich_snippets)} itemprop="image"{/if} />
Best regards.Attachments:
see front
https://www.4campers.nl/winkel/
no pic in the price-drop and viewed product slidernest regrads,
FrankAttachments:
- AuthorPosts
You must be logged in to reply to this topic.