mani313 Posted September 19, 2013 Share Posted September 19, 2013 hi there, i want to remove cover image in gallery of product in prodcut page ..is it possible? thanks in advance Link to comment Share on other sites More sharing options...
vekia Posted September 19, 2013 Share Posted September 19, 2013 but the question is: what kind of image gallery you use? by default there is "thickbox" if you want to remove it - gallery will not work Link to comment Share on other sites More sharing options...
mani313 Posted September 19, 2013 Author Share Posted September 19, 2013 yes thickbox is default i'm using that, only thing have to remove cover image from gallery... any suggestion ? Link to comment Share on other sites More sharing options...
mani313 Posted September 19, 2013 Author Share Posted September 19, 2013 (edited) thanks to vekia.. i called this for, cover image has weird look in my artshop. usually images playing important roles. so i've prepared cropped image (max. 192x192px) as thumb nail cover image for product list view but, when it comes to gallery view and jqzooming it looks so weird. the problem solved thorugh simple code solution : just update in /themes/theme_name/product.tpl <span id="view_full_size"> <a id="big_pic" class="pb-product-image jqzoom" href="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')}" title="{$product->name|escape:'htmlall':'UTF-8'}"> {foreach from=$images item=image name=thumbnails} {if $image.cover!=1} <img id="small_pic" cover="{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $image.id_image, 'thickbox_default')}" /> {break} {/if} {/foreach} </a> </span> and , dont forget to close 'if' clause in following code <div id="thumbs_list"> <ul id="thumbs_list_frame"> {foreach from=$images item=image name=thumbnails} {assign var=imageIds value="`$product->id`-`$image.id_image`"} {if $image.cover!=1} <li id="thumbnail_{$image.id_image}"> Edited September 19, 2013 by mani313 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 19, 2013 Share Posted September 19, 2013 i just thought that you want to remove thickbox at all thanks for your solution! is there any chance to test it in your store? if so, can you share the url pls? Link to comment Share on other sites More sharing options...
mani313 Posted September 19, 2013 Author Share Posted September 19, 2013 sorry it have not launched yet..and password protected by client so i'll pm you thanx Link to comment Share on other sites More sharing options...
babyewok Posted September 19, 2013 Share Posted September 19, 2013 Thanks mani313 - this is the exactly what I was looking for (and for exactly the same reasons as you!). Not tested yet. I am using 1.4.11, but I assume the principal is the same cross versions? Link to comment Share on other sites More sharing options...
mani313 Posted September 19, 2013 Author Share Posted September 19, 2013 Thanks mani313 - this is the exactly what I was looking for (and for exactly the same reasons as you!). Not tested yet. I am using 1.4.11, but I assume the principal is the same cross versions? no! i'm using 1.5.3.1, and its not going to differ about versions i think. hope it'll help you ! Link to comment Share on other sites More sharing options...
bulla101 Posted March 22, 2015 Share Posted March 22, 2015 Hi, anyone know how to get this to work on Prestashop 1.6? Link to comment Share on other sites More sharing options...
dwojod Posted February 26, 2016 Share Posted February 26, 2016 Hi ver 1.6 after '{if $have_image}' - line 80 - add this code {foreach from=$images item=image name=bigImg key=i} {if $smarty.foreach.bigImg.iteration == 2} {assign var=imageLegendCover value=$image.legend|escape:'html':'UTF-8'} {assign var=imageIdCover value=$image.id_image} {/if} {/foreach} then you should change variable $cover.legend - $imageLegendCover $cover.id_image - $imageIdCover <span id="view_full_size"> {if $jqZoomEnabled && $have_image && !$content_only} <a class="jqzoom" title="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" rel="gal1" href="{$link->getImageLink($product->link_rewrite, $imageIdCover, 'thickbox_default')|escape:'html':'UTF-8'}"> <img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $imageIdCover, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"/> </a> {else} <img id="bigpic" itemprop="image" src="{$link->getImageLink($product->link_rewrite, $imageIdCover, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($imageLegendCover)}{$imageLegendCover|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" width="{$largeSize.width}" height="{$largeSize.height}"/> {if !$content_only} <span class="span_link no-print">{l s='View larger'}</span> {/if} {/if} </span> and the last thing: thumbnails {if $smarty.foreach.thumbnails.iteration != 1} <li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="last"{/if}> <a{if $jqZoomEnabled && $have_image && !$content_only} href="javascript:void(0);" rel="{literal}[spam-filter]/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal[spam-filter]{/literal}"{else} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}" data-fancybox-group="other-views" class="fancybox{if $image.position == 2} shown{/if}"{/if} title="{$imageTitle}"> <img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}"{if isset($cartSize)} height="{$cartSize.height}" width="{$cartSize.width}"{/if} itemprop="image" /> </a> </li> {/if} In the BO you have to remember, when you add pictures to the gallery - first there must be cover. Link to comment Share on other sites More sharing options...
Recommended Posts