Jump to content

Hide cover image in thumbnails list


Recommended Posts

Thanks a lot, Rocky!! It works perfect. I just needed this conditional sentence: {if $image.id_image != $cover.id_image_only}.

The problem now is that I am trying to show the first product image (not the cover one) as the default in the product.tpl page. I think I have to change the following line, but I do not how:

%7B$img_prod_dir%7D%7B$cover.id_image%7Dname|escape:'htmlall':'UTF-8'}"/>

I really appreciate your help.

THANKS A LOT again.

Link to comment
Share on other sites

Try changing:

<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic"/>



to:

<img src="{$link->getImageLink($product->link_rewrite, $images.0.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $images.0.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic"/>

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Greetings

 

I am using the latest Prestashop and this condition is hiding a different thumb, not the cover

{if $image.id_image != $cover.id_image_only} 

 

My product is using combinations and i have selected not to display the cover thumb ( in that image list )

 

However on the product first load it always appears.

 

 

 

Now I tried showing just the cover image using this code

 

 {if $image.id_image == $cover.id_image}

 

For some reason it keeps displaying the second position image and ignores the selected and saved cover.

Edited by JStormrage (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...