armenak Posted April 1, 2013 Share Posted April 1, 2013 Hi Guys, I've recently discovered Prestashop and liked it very much. Many thanks to developers for this Open Source solution. For this moment, I have one question and kindly ask someone to help. My product list thumbnails are set to 220*330, so when I upload an image with a smaller height, a white border appears on the top of the thumbnail ( please, see the attached file) . For new product tab, I use loftab module and this module seems to zoom the thumnails, so the above kind borders do not appear ( please, see the attached file). I would like to have all my product list images a little bit zoomed, not enlarged (as it can be done in preferences/images). What should I change in coding? Thank you ! Link to comment Share on other sites More sharing options...
vekia Posted April 1, 2013 Share Posted April 1, 2013 I wonder how exactly the code in lof module looks like. I mean the code in the browser, I guess that there I'll find a hint your store is online? if so, can you paste url? if not, maybe paste here piece of code? (with css styles) Link to comment Share on other sites More sharing options...
armenak Posted April 2, 2013 Author Share Posted April 2, 2013 (edited) Thank you for quick response. I really appreciate it. As a demo I use this templete http://www.leotheme.com/prestashop/themes/200-leo-tshirt.html . II use loftab version 1.5 and in its folder there are 2 files, so post them both: First, default.tpl <div class="lof-module-tabsnews {$theme} lof-tabs-{$lofiso_code} clearfix" style="width:{$moduleWidth}{if $moduleWidth != 'auto'}px{/if};height:{$moduleHeight}{if $moduleHeight != 'auto'}px{/if}"> <div id="lof-tabnews-module-{$moduleId}" style="width:100%;"> <script type="text/javascript"> {if ($showTips == "lof-tooltip") AND ($checkversion >= 1.4)} jQuery(document).ready(function() {ldelim} jQuery("body").delegate("#lof-tabnews-module-{$moduleId}", 'mouseenter', function(){ldelim} jQuery(".lof-tool-item-{$moduleId}").tooltip({ldelim} effect: 'slide', offset: [0, 2], onBeforeShow: function(event, position) {ldelim} this.getTip().appendTo(document.body); return true;{rdelim}{rdelim} ); {rdelim}); {rdelim}); {/if} var lofatabs = new Array(); var key = 0; </script> <div class="lof-tabnews-panel" style="width:{$moduleWidth-30}px"> <ul class="tabs-panel tabs-panel-{$moduleId}"> {if ($featuredTab == 1)} <li class="lof-tab"> <div class="bg-tabs-left-bd"> <a href="#lof-tabs-{$moduleId}-featured" rel="{if $lofloaded != 'featuredTab'}featured-0{else}lof{/if}" id="featuredTab-content"> <script type="text/javascript"> lofatabs[key] = 'featuredTab-content'; key++; </script> <span class="bg-tabs-left"> <span class="bg-tabs-middle">{l s='Featured' mod='loftabs'}</span> </span> </a> </div> </li> {/if} {if ($newTab == 1)} <li class="lof-tab"> <div class="bg-tabs-left-bd"> <a href="#lof-tabs-{$moduleId}-new" rel="{if $lofloaded != 'newTab'}new-0{else}lof{/if}" id="newTab-content"> <script type="text/javascript"> lofatabs[key] = 'newTab-content'; key++; </script> <span class="bg-tabs-left"> <span class="bg-tabs-middle">{l s='New Products' mod='loftabs'}</span> </span> </a> </div> </li> {/if} {if ($bestsellerTab == 1)} <li class="lof-tab leo-bestseller"> <div class="bg-tabs-left-bd"> <a href="#lof-tabs-{$moduleId}-bestseller" rel="{if $lofloaded != 'bestsellerTab'}bestseller-0{else}lof{/if}" id="bestsellerTab-content"> <script type="text/javascript"> lofatabs[key] = 'bestsellerTab-content'; key++; </script> <span class="bg-tabs-left"> <span class="bg-tabs-middle">{l s='Best Seller' mod='loftabs'}</span> </span> </a> </div> </li> {/if} {if ($specialTab == 1)} <li class="lof-tab"> <div class="bg-tabs-left-bd"> <a href="#lof-tabs-{$moduleId}-special" rel="{if $lofloaded != 'specialTab'}special-0{else}lof{/if}" id="specialTab-content"> <script type="text/javascript"> lofatabs[key] = 'specialTab-content'; key++; </script> <span class="bg-tabs-left"> <span class="bg-tabs-middle">{l s='Specials' mod='loftabs'}</span> </span> </a> </div> </li> {/if} {if ($enablemanu == 1) AND ($manus != '')} {foreach from=$manus item=manu} {assign var='manustr' value="manu-"|cat:$manu.id_manufacturer} <li class="lof-tab"> <div class="bg-tabs-left-bd"> <a href="#lof-tabs-{$moduleId}-{$manu.id_manufacturer}-manu" rel="{if $lofloaded != $manustr}manu-{$manu.id_manufacturer}{else}lof{/if}" id="manuTab-content-{$manu.id_manufacturer}"> <script type="text/javascript"> lofatabs[key] = 'manuTab-content-{$manu.id_manufacturer}'; key++; </script> <span class="bg-tabs-left"> <span class="bg-tabs-middle">{$manu.name}</span> </span> </a> </div> </li> {/foreach} {/if} {if ($enableCate == 1)} {foreach from=$cates item=cate} {assign var='catestr' value='cate-'|cat:$cate.id_category} <li class="lof-tab" dir="lof-tabs-{$moduleId}-{$cate.id_category}"> <div class="bg-tabs-left-bd"> <a href="#lof-tabs-{$moduleId}-{$cate.id_category}-cate" rel="{if $lofloaded != $catestr}cate-{$cate.id_category}{else}lof{/if}" id="cateTab-content-{$cate.id_category}"> <script type="text/javascript"> lofatabs[key] = 'cateTab-content-{$cate.id_category}'; key++; </script> <span class="bg-tabs-left"> <span class="bg-tabs-middle">{$cate.name}</span> </span> </a> </div> </li> {/foreach} {/if} </ul> </div> <div class="lof-tabnews-content"> {if $featuredTab == 1} <div id="lof-tabs-{$moduleId}-featured" class="lof-content-tab lof-content-tab-{$moduleId} featuredTab-content"> {include file="$featuredUrlLayouts"} </div> {/if} {if $newTab == 1} <div id="lof-tabs-{$moduleId}-new" class="lof-content-tab lof-content-tab-{$moduleId} newTab-content"> {include file="$newProductsUrlLayouts"} </div> {/if} {if $bestsellerTab == 1} <div id="lof-tabs-{$moduleId}-bestseller" class="lof-content-tab lof-content-tab-{$moduleId} bestsellerTab-content"> {include file="$bestSellerUrlLayouts"} </div> {/if} {if $specialTab == 1} <div id="lof-tabs-{$moduleId}-special" class="lof-content-tab lof-content-tab-{$moduleId} specialTab-content"> {include file="$specialUrlLayouts"} </div> {/if} {if $enablemanu == 1} {foreach from=$manus item=manu} <div id="lof-tabs-{$moduleId}-{$manu.id_manufacturer}-manu" class="lof-content-tab lof-content-tab-{$moduleId} manuTab-content-{$manu.id_manufacturer}"> {include file="$manuUrlLayouts"} </div> {/foreach} <div class="clr clearfix"></div> {/if} {if $enableCate} {foreach from=$cates item=cate} <div id="lof-tabs-{$moduleId}-{$cate.id_category}-cate" class="lof-content-tab lof-content-tab-{$moduleId} cateTab-content-{$cate.id_category}"> {include file="$cateUrlLayouts"} </div> {/foreach} {/if} <div class="clr clearfix"></div> </div> <div class="clr clearfix"></div> </div> </div> Edited April 2, 2013 by armenak (see edit history) Link to comment Share on other sites More sharing options...
armenak Posted April 2, 2013 Author Share Posted April 2, 2013 Second file - newproduct.tpl {if (!empty($loflistNewProducts[0]))} {if $firstAjax} {if $showTips == 'lof-tipbox'} <script type="text/javascript"> /* <![CDATA[ */ jQuery(document).ready(function($) {ldelim} jQuery("body").delegate("#lof-tabnews-module-{$moduleId}", 'mouseenter', function(){ldelim} $(".lof-box-tools-new .product_label").hover(function() {ldelim} $(".lof-box-tools-new .product_label").removeClass("open"); $(this).removeClass("opacize").addClass("open"); {rdelim}, function () {ldelim} $(this).removeClass("open"); {rdelim}); $(".lof-box-tools-new .product_label .close").click(function() {ldelim} $(this).parents(".product_label").removeClass("open"); $(".lof-box-tools-new .product_label").removeClass("opacize"); {rdelim}); {rdelim}); {rdelim}); /* ]]> */ </script> {/if} {if $totalPages > 1} <script type="text/javascript"> jQuery(document).ready(function() {ldelim} jQuery("#lof-content-main-new-{$moduleId}").lofeasySliderTabs({ldelim} prevId: 'lof-prev-new-{$moduleId}', nextId: 'lof-next-new-{$moduleId}', catId: 'new', totalPage: {$totalPages}, moduleTheme: '{$theme}', auto: {$autoPlay}, widthPage: {if $moduleWidth == 'auto'}'auto'{else}{$moduleWidth}{/if}, speed: {$speed}, continuous: true, controlsShow:false {rdelim}); {rdelim}); </script> {/if} {if ($totalPages > 1 AND ($showButton == 1))} <div class="lof-buttons"> <div id="lof-prev-new-{$moduleId}" class="lof-prev"><a href="javascript:void(0);" rel="new-0" id="page_{$totalPages}"></a></div> <div id="lof-next-new-{$moduleId}" class="lof-next"><a href="javascript:void(0);" rel="new-0" id="page_0"></a></div> <a href="#" style="display:none;" id="lofpage-new-0" rel="0"></a> <a href="#" style="display:none;" id="totalPages-new-0" rel="{$totalPages}"></a> </div> {/if} <div class="lof-container" id="lof-content-main-new-{$moduleId}"> {/if} {if $firstAjax} <ul class="lof-content-main"> <li id="lofpage-new-0-0" class="lof-main-item lof_load"> {/if} {foreach from=$loflistNewProducts[0] key=i item=item} <div class="lof-content-main-item" style="width:{$itemWidth}%"> <div class="bd-lof-content ajax_block_product clearfix" style="float:left;width:{$thumbmainWidth}px"> {if $showImage == 1} <div class="lof-box-tools-new lof-box-tools"> <div class="product_label lof-tool-item lof-tool-item-{$moduleId}" style="height:{$thumbmainHeight}px;width:{$thumbmainWidth}px;"> {if $item.lof_online_only_icon != '' AND $onlineIcon == 1} <div class="{$item.lof_online_only_icon}"> </div> {/if} {if $item.lof_sale_icon != '' AND $saleIcon == 1} <div class="{$item.lof_sale_icon}"> </div> {/if} {if $item.lof_new_icon != '' AND $newIcon == 1} <div class="{$item.lof_new_icon}"> </div> {/if} {if $item.lof_features != '' AND $featureIcon == 1} <div class="{$item.lof_features}"> </div> {/if} <a href="{$item.link}" target="{$target}" class="product_img_link product_image"><img src="{$item.mainImge}" alt="" /></a> {if ($showTips == "lof-tipbox")} <div class="lof-content-tools-text"> <h4>{$item.name}</h4> <div class="box-price"> <span class="lof-price">{if !$priceDisplay}{convertPrice price=$item.price}{else}{convertPrice price=$item.price_tax_exc}{/if}</span> {if $item.specific_prices AND ($priceSpecial == 1)} <span class="lof-price-discount">{displayWtPrice p=$item.price_without_reduction}</span>{/if} </div> <div class="box-detail"><a href="<?php echo $item['link'];?>">{l s='Detail' mod='loftabs'}</a></div> <span class="close"></span> </div> {/if} </div> </div> {if (($showTips == "lof-tooltip") AND ($checkversion >= 1.4))} <div class="tooltip"> <div style="position: relative;background: #FFFFFF;width:430px;height: 200px;"> <div style="position: relative;width:430px;height: 200px;overflow: hidden;"> <span class="lof-tooltip-image"><a href="{$item.link}" target="{$target}"><img src="{$item.thumbImge}" alt="" style="height:100%;"/></a></span> </div> <div class="lof-tools-opacity" style="width:100%;"> <h4><a href="{$item.link}" target="{$target}">{$item.name}</a></h4> </div> </div> </div> {/if} {/if} <div class="lof-item-content" style="width:{$thumbmainWidth}px;"> {if ($showTitle == 1)}<h4><a href="{$item.link}" target="{$target}">{$item.name|truncate:20:'...'|escape:'htmlall':'UTF-8'}</a></h4>{/if} {if ($showPuplic == 1)} <span style="color: #333333;font-size:11px;font-style: italic;"> {$item.dateAdd} </span> {/if} {if ($showDesc == 1)}<div class="lof-main-description"><p>{$item.description}</p></div>{/if} {if ($showPrice == 1)} <div class="lof-tools-opacity"> <span class="lof-price-contain"> <span class="lof-price">{if !$priceDisplay}{convertPrice price=$item.price}{else}{convertPrice price=$item.price_tax_exc}{/if}</span> {if $item.specific_prices AND ($priceSpecial == 1)} <span class="lof-price-discount">{displayWtPrice p=$item.price_without_reduction}</span>{/if} </span> <a class="lof-detail" href="{$item.link}"><span>{l s='detail' mod='loftabs'}</span></a> </div> {/if} {if (($item.quantity > 0 OR $item.allow_oosp))} <a class="lof-add-cart ajax_add_to_cart_button" rel="ajax_id_product_{$item.id_product}" href="{$site_url}cart.php?add&id_product={$item.id_product}&token={$token}"><span>{l s='Add to cart' mod='loftabs'}</span></a> {else} <span class="lof-add-cart">{l s='Add to cart' mod='loftabs'}</span> {/if} <div class="lofbottom"> </div> </div> </div> </div> {if ( ($i+1) % $limitnumcols== 0 AND $i < count($loflistNewProducts[0])-1 )} <div class="clr clearfix"></div> {/if} {/foreach} {if $firstAjax} </li> {if $totalPages >= 2} {section name=foo start=1 loop=$totalPages step=1} <li id="lofpage-new-0-{$smarty.section.foo.index}" class="lof-main-item" style="width:{$moduleWidth-10}px;"> <div class="clr clearfix"></div> </li> {/section} {/if} </ul> <div class="clr clearfix"></div> {/if} {if $firstAjax} </div> {/if} {/if} Link to comment Share on other sites More sharing options...
armenak Posted April 2, 2013 Author Share Posted April 2, 2013 (edited) please, find attached global.css Thank you. global.css Edited April 2, 2013 by armenak (see edit history) Link to comment Share on other sites More sharing options...
armenak Posted April 3, 2013 Author Share Posted April 3, 2013 Any idea? Nobody knows ? 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