If your product page has just a single image, there’s no need to display the same picture in a small format just below the cover image: it will be a simple repetition.
To avoid that, you have to perform this very quick and simple modification:
- Use your favorite Text Editor and open the file called product-cover-thumbnails.tpl inside /themes/your-theme/templates/catalog/_partials/
- If you cannot find this file, copy it from /themes/classic/templates/catalog/_partials/ and paste it into /themes/your-theme/templates/catalog/_partials/
- Look at this code:
{block name='product_images'} <div class="js-qv-mask mask"> <ul class="product-images js-qv-product-images"> {foreach from=$product.images item=image} <li class="thumb-container"> <img class="thumb js-thumb {if $image.id_image == $product.cover.id_image} selected {/if}" data-image-medium-src="{$image.bySize.medium_default.url}" data-image-large-src="{$image.bySize.large_default.url}" src="{$image.bySize.home_default.url}" alt="{$image.legend}" title="{$image.legend} width="100" itemprop="image" > </li> {/foreach} </ul> </div> {/block}
- Replace with:
{if $product.images|@count > 1}
{block name='product_images'}
<div class="js-qv-mask mask">
<ul class="product-images js-qv-product-images">
{foreach from=$product.images item=image}
<li class="thumb-container">
<img
class="thumb js-thumb {if $image.id_image == $product.cover.id_image} selected {/if}"
data-image-medium-src="{$image.bySize.medium_default.url}"
data-image-large-src="{$image.bySize.large_default.url}"
src="{$image.bySize.home_default.url}"
alt="{$image.legend}"
title="{$image.legend}"
width="100"
itemprop="image"
>
</li>
{/foreach}
</ul>
</div>
{/block} {/if} - Save the file
- It could be necessary to delete the cache of Prestashop (Advanced Parameters > Performance) and of your browser. (Please, be sure that “Recompile templates if the files have been updated” is enabled)
We are curious to read your opinion!