On 9/24/2019 at 8:23 AM, dinesh badrukhiya said:Follow this tutorial: How to show cover image of your product with combination in PrestaShop 1.7?
Use this code instead:
{if $product.cover}
{assign var='coverImage' value=Product::getCover($product->id)}
{assign var='coverImageId' value="{$product->id}-{$coverImage.id_image}"}
<a class="thumbnail product-thumbnail" href="{$product.canonical_url}">
<img src="{$link->getImageLink($product.link_rewrite, $coverImageId, 'home_default')}" alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}" data-full-size-image-url="{$product.cover.large.url}" />
</a>
{else}
<a class="thumbnail product-thumbnail" href="{$product.canonical_url}">
<img src="{$urls.no_picture_image.bySize.home_default.url}" />
</a>
{/if}