What's New
Tagged: cover image
- AuthorPosts
Hi,
Please modify the \themes\panda\templates\catalog\_partials\product-cover-item.tpl
Replace<img class="pro_gallery_item {if !$sttheme.is_ajax && !$sttheme.lazyload_main_gallery}swiper-lazy{/if}" {if !$sttheme.is_ajax && !$sttheme.lazyload_main_gallery}data-{/if}src="{$image.bySize.{$sttheme.gallery_image_type}.url}" {if $sttheme.retina && isset($image.bySize.{$sttheme.gallery_image_type|cat:'_2x'}.url)} {if !$sttheme.is_ajax && !$sttheme.lazyload_main_gallery}data-{/if}srcset="{$image.bySize.{$sttheme.gallery_image_type|cat:'_2x'}.url} 2x" {/if} alt="{if $image.legend}{$image.legend}{else}{$product.name}{/if}" width="{$image.bySize.{$sttheme.gallery_image_type}.width}" height="{$image.bySize.{$sttheme.gallery_image_type}.height}" data-id_image="{$image.id_image}" {if $sttheme.google_rich_snippets} itemprop="image" content="{$image.bySize.{$sttheme.gallery_image_type}.url}" {/if} />
To
<img class="pro_gallery_item {if !$sttheme.is_ajax && !$sttheme.lazyload_main_gallery}swiper-lazy{/if}" {if !$sttheme.is_ajax && !$sttheme.lazyload_main_gallery}data-{/if}src="{$link->getImageLink($product.link_rewrite, $product.id_image, $sttheme.gallery_image_type)}" {if $sttheme.retina && isset($image.bySize.{$sttheme.gallery_image_type|cat:'_2x'}.url)} {if !$sttheme.is_ajax && !$sttheme.lazyload_main_gallery}data-{/if}srcset="{$link->getImageLink($product.link_rewrite, $product.id_image, $sttheme.gallery_image_type)} 2x" {/if} alt="{if $image.legend}{$image.legend}{else}{$product.name}{/if}" width="{$image.bySize.{$sttheme.gallery_image_type}.width}" height="{$image.bySize.{$sttheme.gallery_image_type}.height}" data-id_image="{$image.id_image}" {if $sttheme.google_rich_snippets} itemprop="image" content="{$image.bySize.{$sttheme.gallery_image_type}.url}" {/if} />
See attached screenshot.
Best regards.Attachments:
Hello,
After upgrade to lates version of the themes version 2.4.8 this changes into the files will no longer work.
whate do i have to do or change to get is work on the lates version.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.Hello,
I have don that but that doesnt work annymore, the files are changed in the version 2.4.8.
compare your self the differences between the files.
I have changes the files but no result.
If i but the old modified files from v.2.4.5 it will work again but the changes in v.2.4.8..best regards,
FrankHi,
I modified those two files for you, please replace them by the attached ones.
Best regards.Attachments:
- AuthorPosts
You must be logged in to reply to this topic.