fscarballo Posted September 30, 2010 Share Posted September 30, 2010 I am trying to show all product images in the thumbnail list (product.tpl and product.php) except the cover (just hide this one). Does anyone have any idea of how to do it?Thanks a lot and best regards. Link to comment Share on other sites More sharing options...
rocky Posted October 1, 2010 Share Posted October 1, 2010 See here. Link to comment Share on other sites More sharing options...
fscarballo Posted October 1, 2010 Author Share Posted October 1, 2010 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:name|escape:'htmlall':'UTF-8'}"/>I really appreciate your help.THANKS A LOT again. Link to comment Share on other sites More sharing options...
rocky Posted October 1, 2010 Share Posted October 1, 2010 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 More sharing options...
fscarballo Posted October 1, 2010 Author Share Posted October 1, 2010 I am so sorry, I can't find the first code in product.tpl. I just have this one: So I can't change the lines you gave me. Do you know which mistake I am making?Thanks a lot again. Link to comment Share on other sites More sharing options...
rocky Posted October 2, 2010 Share Posted October 2, 2010 I'm not sure what version of PrestaShop you are using, but {$images.0.id_image} should be the ID of the first image and {$cover.id_image} should be the ID of the cover image. Link to comment Share on other sites More sharing options...
fscarballo Posted October 4, 2010 Author Share Posted October 4, 2010 It's so strange. Prestashop version is 1.3.1.1. I am still trying to change: to But this last doesn't work? Any idea to explain why?Thank you very much. Link to comment Share on other sites More sharing options...
mlarino Posted October 4, 2010 Share Posted October 4, 2010 HiI also tried {$images.0.id_image} but it doesnt call the first image, it actually doesnt do anything at all... :SDoes someone know a way to call the first image?thanks Link to comment Share on other sites More sharing options...
lucane Posted February 9, 2012 Share Posted February 9, 2012 Does this work for 1.4.6.2? I can't even find the relevant product.php file, let alone the code within it that I am supposed to alter. Thank you for your assistance! Link to comment Share on other sites More sharing options...
lucane Posted February 10, 2012 Share Posted February 10, 2012 Can anyone get this to work in Prestashop 1.4? Link to comment Share on other sites More sharing options...
lucane Posted February 11, 2012 Share Posted February 11, 2012 Please, can anyone help at all with this? Link to comment Share on other sites More sharing options...
JStormrage Posted June 2, 2013 Share Posted June 2, 2013 (edited) 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 June 2, 2013 by JStormrage (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now