ujita tharani Posted September 14, 2013 Share Posted September 14, 2013 hello.... i want 3 products per each row in the "featured products" module of home page... i tried it by changing width="{$homeSize.width}" style="margin-left: 24.5px;" in homefeatured.tpl but no result.... Please will any one help me out?? my site link is:http://www.hieteq.com/store/index.php Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 you need to change css styles of this module and also change {assign var='nbItemsPerLine' value=4} instead of value=4 use value=3 this is a part of homefeatured.tpl file. make sure that you edit correct file (if you've got it in your theme dir - you have to edti this one) 3 Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 no change then too..... Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 i don't know what you changed and where, can you shed some light on this? show css styles, contents of your header.tpl file. + make sure that you've got force compile turned to ON and cache OFF (under adv. parameters > performance tab) Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 sorry again no change... i tried that also.... Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 (edited) {** 2007-2013 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Academic Free License (AFL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/afl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.** @author PrestaShop SA <[email protected]>* @copyright 2007-2013 PrestaShop SA* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* International Registered Trademark & Property of PrestaShop SA*}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"> <![endif]--><!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]--><!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]--><!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"> <![endif]--><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}"> <head> <title>{$meta_title|escape:'htmlall':'UTF-8'}</title>{if isset($meta_description) AND $meta_description} <meta name="description" content="{$meta_description|escape:html:'UTF-8'}" />{/if}{if isset($meta_keywords) AND $meta_keywords} <meta name="keywords" content="{$meta_keywords|escape:html:'UTF-8'}" />{/if} <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta http-equiv="content-language" content="{$meta_language}" /> <meta name="generator" content="PrestaShop" /> <meta name="robots" content="{if isset($nobots)}no{/if}index,{if isset($nofollow) && $nofollow}no{/if}follow" /> <link rel="icon" type="image/vnd.microsoft.icon" href="{$favicon_url}?{$img_update_time}" /> <link rel="shortcut icon" type="image/x-icon" href="{$favicon_url}?{$img_update_time}" /> <script type="text/javascript"> var baseDir = '{$content_dir|addslashes}'; var baseUri = '{$base_uri|addslashes}'; var static_token = '{$static_token|addslashes}'; var token = '{$token|addslashes}'; var priceDisplayPrecision = {$priceDisplayPrecision*$currency->decimals}; var priceDisplayMethod = {$priceDisplay}; var roundMode = {$roundMode}; </script>{if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach}{/if}{if isset($js_files)} {foreach from=$js_files item=js_uri} <script type="text/javascript" src="{$js_uri}"></script> {/foreach}{/if} {$HOOK_HEADER} </head> <body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{if $hide_left_column}hide-left-column {/if} {if $hide_right_column}hide-right-column {/if} {if $content_only} content_only {/if}"> {if !$content_only} {if isset($restricted_country_mode) && $restricted_country_mode} <div id="restricted-country"> <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p> </div> {/if} <div id="page" class="container_9 clearfix"> <!-- Header --> <div id="header" class="grid_9 alpha omega"> <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"> <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}/> </a> <div id="header_right" class="grid_9 omega"> {$HOOK_TOP} </div> </div> <div id="columns" class="grid_9 alpha omega clearfix"> <!-- Left --> <div id="left_column" class="column grid_2 alpha"> {$HOOK_LEFT_COLUMN} </div> <!-- Center --> <div id="center_column" class=" grid_7 omega"> {/if} this is my header.tpl file Edited September 14, 2013 by ujita tharani (see edit history) Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 http://www.hieteq.com/store/index.php Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 {** 2007-2013 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Academic Free License (AFL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/afl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.** @author PrestaShop SA <[email protected]>* @copyright 2007-2013 PrestaShop SA* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* International Registered Trademark & Property of PrestaShop SA*}<!-- MODULE Home Featured Products --><div id="featured-products_block_center" class="block products_block clearfix"> <p class="title_block">{l s='Featured products' mod='homefeatured'}</p> {if isset($products) AND $products} <div class="block_content"> {assign var='liHeight' value=250} {assign var='nbItemsPerLine' value=3} {assign var='nbLi' value=$products|@count} {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} {math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight} <ul style="height:{$ulHeight}px;"> {foreach from=$products item=product name=homeFeaturedProducts} {math equation="(total%perLine)" total=$smarty.foreach.homeFeaturedProducts.total perLine=$nbItemsPerLine assign=totModulo} {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if} <li class="ajax_block_product {if $smarty.foreach.homeFeaturedProducts.first}first_item{elseif $smarty.foreach.homeFeaturedProducts.last}last_item{else}item{/if} {if $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 0}last_item_of_line{elseif $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 1} {/if} {if $smarty.foreach.homeFeaturedProducts.iteration > ($smarty.foreach.homeFeaturedProducts.total - $totModulo)}last_line{/if}"> <a href="{$product.link|escape:'html'}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='homefeatured'}</span>{/if}</a> <p class="s_title_block"><a href="{$product.link|escape:'html'}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></p> <div class="product_desc"><a href="{$product.link|escape:'html'}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:65:'...'}</a></div> <div> <a class="lnk_more" href="{$product.link|escape:'html'}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')|escape:'html'}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {else} <div style="height:23px;"></div> {/if} </div> </li> {/foreach} </ul> </div> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if}</div><!-- /MODULE Home Featured Products --> this is my homefeatured.tpl file Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 okay and what about css styles? i said before that it is also necessary to change it. you didn't changed css styles. this is the main cause Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 after little css modification you can achieve something like: what to do? change <li> width and that's all... Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 i have to change in global.css? Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 nope, you have to change this: #featured-products_block_center li { margin-right: 10px; padding: 10px 0; width: 126px; height: 240px; } in http://www.hieteq.com/store/modules/homefeatured/homefeatured.css Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 sorry for silly question but in which css and what have i to change? sorry for asking such a question... but i'm totally confused as i'm new to all this... Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 its already the same css written as you told... Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 I showed you code which you have to change. now you have to customize it just increase value of width param to value chich will fit your needs Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 (edited) http://www.hieteq.com/store/index.php now you see the "new" block got widend... yes i changed but now the other css gets affected.... Edited September 14, 2013 by ujita tharani (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 new products block has got the same width as before, i don't see the difference Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 you need to customize styles, this is all, nothing more - no core changes etc. here is the code for what you want. #featured-products_block_center li { margin-right: 10px; padding: 10px 0; width: 240px; height: 240px; } #featured-products_block_center .product_image { display: block; position: relative; overflow: hidden; width: 126px; } if you will need more customization, read something about css styles here: http://www.w3schools.com/css/ Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 thanks a lot for the help.... i solved the problem... thank you very very very much...... Link to comment Share on other sites More sharing options...
vekia Posted September 14, 2013 Share Posted September 14, 2013 Im glad that i could help you a little in this case im going to mark this topic as [solved] best regards 1 Link to comment Share on other sites More sharing options...
ujita tharani Posted September 14, 2013 Author Share Posted September 14, 2013 ok sure thank you..... 1 Link to comment Share on other sites More sharing options...
shento Posted October 22, 2013 Share Posted October 22, 2013 (edited) Dear Ujita tharani its too easy follow the steps >> 1st :In your WWW directory find ( theme folder ) click then ( Your theme ) find ( Module folder ) find ( homefeatured folder ) open homefeatured.tpl file find out line # 32 where mention {assign var='nbItemsPerLine' value=4} make it 4 to 3.2nd :In your WWW directory find ( Modules folder ) find ( homefeatured folder ) find ( homefeatured.css ) Just Copy all css and replace all.--------------------------------------------- >> --------------------------------------------------#featured-products_block_center li { margin-right:11px; margin: 12px 0px 0px 11px; margin-top:12px; padding: 0px; height:245px; display:block; border-bottom: 1px solid #D5D5D5; /*background-color:#F7F3F3; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; border:solid 1px #E9E9E9;*/}/*#featured-products_block_center .ul { padding: 0px; margin: 0 auto; width:740px; border: 1px solid red;}*/#featured-products_block_center li.last_item_of_line {margin-right:0;}#featured-products_block_center .s_title_block, #featured-products_block_center h5 { padding-top:0px; height:20px; font-size:11px; color:#EA2222; text-align:center; padding-bottom: 0;}#title{ font-size: 22px; padding: 0px 0px 10px 0px; font-weight: bold; color: black; font-family: sans-serif; border-bottom: 1px dotted #B7B7B7; margin: 20px 0px 10px 0px;}#featured-products_block_center .product_image { display:block; position:relative; margin: 0px; overflow:hidden}#featured-products_block_center .product_image span.new { display: block; position: absolute; top: 15px; right:-30px; padding: 1px 4px; width: 101px; font-size:10px; color: #fff; text-align: center; text-transform: uppercase; -moz-transform: rotate(45deg); -webkit-transform: rotate(45deg); -o-transform:rotate(45deg); -ms-transform: rotate(45deg); background-color: #B24667; transform: rotate(45deg); /* Newer browsers */}#featured-products_block_center .product_desc {}#featured-products_block_center .product_desc,#featured-products_block_center .product_desc a { color:#004EBB; font-weight: bold; text-decoration: underline; font-size: 13px; padding: 0px; text-align: left;}#featured-products_block_center .lnk_more { display:inline; margin-left:12px; padding-right:10px; height:30px; font-weight:bold; font-size:10px; color:#0088cc; background:url(img/arrow_right_1.png) no-repeat 100% 3px;}#featured-products_block_center .price_container { margin-top: 10px; padding:0px; text-align: left;}#featured-products_block_center .price { font-size:14px; color:#990000; font-weight: bold;}#featured-products_block_center .price2 { font-size:12px; font-weight:bold; color:#666666; margin-left:10px; margin-bottom:5px; }#featured-products_block_center li .ajax_add_to_cart_button { display:block; border: 1px solid #E63600; margin-top:8px; color: white; width:70px; background-color: #FF521D; text-align:center;}#featured-products_block_center li span.exclusive {display:block;} Edited October 22, 2013 by shento (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 Dear Ujita tharani its too easy follow the steps >> this problem is solved. Link to comment Share on other sites More sharing options...
mkobur Posted November 17, 2013 Share Posted November 17, 2013 Dear sir, my site is http://www.yourhomedrugstore.com/index.php . I looking my Featured products show 2 products par line but i need 3 products picture per line please help me Link to comment Share on other sites More sharing options...
vekia Posted November 17, 2013 Share Posted November 17, 2013 Dear sir, my site is http://www.yourhomedrugstore.com/index.php . I looking my Featured products show 2 products par line but i need 3 products picture per line please help me hello you need to modify css styles for your homefeatured module. decrease width param for <li> elements now you've got there width: 33.3% ul#product_list li { float: left; height: auto; margin-bottom: 20px; min-height: 200px; padding: 0; width: 33.3%; } (its a part of file: http://www.yourhomedrugstore.com/themes/leohite/css/product_list.css) change it to 31.3% effect: 1 Link to comment Share on other sites More sharing options...
kir Posted November 28, 2013 Share Posted November 28, 2013 Hi.I need your help please.On this site http://gr-vapers.com/test/index.php i have 3 featured products in a row on home page.Can you please tell me settings to have 4 products and 5 products?Thanks in advance Link to comment Share on other sites More sharing options...
vekia Posted November 28, 2013 Share Posted November 28, 2013 Hi.I need your help please.On this site http://gr-vapers.com/test/index.php i have 3 featured products in a row on home page.Can you please tell me settings to have 4 products and 5 products?Thanks in advance your website doesnt work. it loads loads and finally die. Link to comment Share on other sites More sharing options...
kir Posted November 28, 2013 Share Posted November 28, 2013 (edited) the site loads now.Can you please check it?Thank you Edited November 29, 2013 by kir (see edit history) Link to comment Share on other sites More sharing options...
kir Posted November 29, 2013 Share Posted November 29, 2013 up Link to comment Share on other sites More sharing options...
vekia Posted December 1, 2013 Share Posted December 1, 2013 i was offiline. i checked it once again, it works the same as before. loads loads loads and die, or load without css styles is very very slow. you've got 3 columns, there is not enough space to insert more that 3 products (it will be unreadable at all) you have to remove one column, then it will be possible to do it. Link to comment Share on other sites More sharing options...
kir Posted December 1, 2013 Share Posted December 1, 2013 can you please check the main site gr-modders.com?Thank you very much Link to comment Share on other sites More sharing options...
vekia Posted December 1, 2013 Share Posted December 1, 2013 can you please check the main site gr-modders.com?Thank you very much you've got 3 columns, there is not enough space to insert more that 3 products (it will be unreadable at all) you have to remove one column, then it will be possible to do it. Link to comment Share on other sites More sharing options...
kir Posted December 1, 2013 Share Posted December 1, 2013 4 products will be ok i think.Is there anyway that i can do this?Thank you Link to comment Share on other sites More sharing options...
mkobur Posted December 1, 2013 Share Posted December 1, 2013 hello you need to modify css styles for your homefeatured module. decrease width param for <li> elements now you've got there width: 33.3% ul#product_list li { float: left; height: auto; margin-bottom: 20px; min-height: 200px; padding: 0; width: 33.3%; } (its a part of file: http://www.yourhomedrugstore.com/themes/leohite/css/product_list.css) change it to 31.3% effect: Link to comment Share on other sites More sharing options...
vekia Posted December 1, 2013 Share Posted December 1, 2013 4 products will be ok i think.Is there anyway that i can do this?Thank you change width:31.2% to 21.2% in: .products_block.grid li { padding: 10px 1%; width: 31.2%; float: left; } Link to comment Share on other sites More sharing options...
kir Posted December 2, 2013 Share Posted December 2, 2013 Thank you very much Vekia !!It works like a charm Link to comment Share on other sites More sharing options...
yunus Posted December 18, 2013 Share Posted December 18, 2013 Hi, Can you help me please with a theme i have bought. I have a problem with the featured products on the home page. I want to insert 10 products with 3 products per row but after 4 products, a new row is created. I used firebug but i don't find the value to modify in a css style. My web site is http://www.e-brillance.fr/. Thank you for your help. Link to comment Share on other sites More sharing options...
vekia Posted December 18, 2013 Share Posted December 18, 2013 hello you have to decrease width of .span3 or change span3 to span2 (in homefeatured.tpl file) Link to comment Share on other sites More sharing options...
yunus Posted December 19, 2013 Share Posted December 19, 2013 I don't understand the syntax of the tpl file: <!-- MODULE Home Featured Products --><section class="block homefeatured"> <h4>{l s='Featured products' mod='homefeatured'}</h4> {if isset($products) AND $products} <ul class="products"> {foreach from=$products item=product name=homeFeaturedProducts} <li class="ajax_block_product "> <a class="product_image" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.name|escape:html:'UTF-8'}" /> </a> <h5><a class="product_link" href="{$product.link}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:25:'...'|escape:'htmlall':'UTF-8'}</a></h5> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> {else}{/if} <p class="product_descr" href="{$product.link}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:100:'...'}</p> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {else} {/if} <a class="button" href="{$product.link}" title="{l s='View' mod='homefeatured'}"><span>{l s='View' mod='homefeatured'}</span></a> </li> {/foreach} </ul> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if}</section><!-- /MODULE Home Featured Products --> Where is the code to modify? Link to comment Share on other sites More sharing options...
vekia Posted December 19, 2013 Share Posted December 19, 2013 hello this file is a part of /modules/ directory ? or /themes/YOUR_THEME/modules/ ? if file exists in your theme dir, please paste contents of this file. Link to comment Share on other sites More sharing options...
yunus Posted December 19, 2013 Share Posted December 19, 2013 this file is a part of themes/name of the theme/modules/homefeatured. I have pasted contents of the homefeatured.tpl file. Link to comment Share on other sites More sharing options...
yunus Posted December 21, 2013 Share Posted December 21, 2013 The content of the tpl file in themes/name_of_theme/modules/homefeatured is: <!-- MODULE Home Featured Products --><section class="block homefeatured"> <h4>{l s='Featured products' mod='homefeatured'}</h4> {if isset($products) AND $products} <ul class="products"> {foreach from=$products item=product name=homeFeaturedProducts} <li class="ajax_block_product "> <a class="product_image" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.name|escape:html:'UTF-8'}" /> </a> <h5><a class="product_link" href="{$product.link}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:25:'...'|escape:'htmlall':'UTF-8'}</a></h5> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p> {else}{/if} <p class="product_descr" href="{$product.link}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:100:'...'}</p> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {else} {/if} <a class="button" href="{$product.link}" title="{l s='View' mod='homefeatured'}"><span>{l s='View' mod='homefeatured'}</span></a> </li> {/foreach} </ul> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if}</section><!-- /MODULE Home Featured Products --> And the content of the tpl file in modules/homefeatured is: <!-- MODULE Home Featured Products --><div id="featured-products_block_center" class="block products_block clearfix"> <h4 class="title_block">{l s='Featured products' mod='homefeatured'}</h4> {if isset($products) AND $products} <div class="block_content"> {assign var='liHeight' value=250} {assign var='nbItemsPerLine' value=3} {assign var='nbLi' value=$products|@count} {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} {math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight} <ul style="height:{$ulHeight}px;"> {foreach from=$products item=product name=homeFeaturedProducts} {math equation="(total%perLine)" total=$smarty.foreach.homeFeaturedProducts.total perLine=$nbItemsPerLine assign=totModulo} {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if} <li class="ajax_block_product {if $smarty.foreach.homeFeaturedProducts.first}first_item{elseif $smarty.foreach.homeFeaturedProducts.last}last_item{else}item{/if} {if $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 0}last_item_of_line{elseif $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 1} {/if} {if $smarty.foreach.homeFeaturedProducts.iteration > ($smarty.foreach.homeFeaturedProducts.total - $totModulo)}last_line{/if}"> <a href="{$product.link|escape:'html'}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='homefeatured'}</span>{/if}</a> <h5 class="s_title_block"><a href="{$product.link|escape:'html'}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h5> <div class="product_desc"><a href="{$product.link|escape:'html'}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:65:'...'}</a></div> <div> <a class="lnk_more" href="{$product.link|escape:'html'}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')|escape:'html'}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {else} <div style="height:23px;"></div> {/if} </div> </li> {/foreach} </ul> </div> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if}</div><!-- /MODULE Home Featured Products --> But i use the module in themes/name_of_theme/modules/homefeatured, the standard module is disable. Can you help me please? Link to comment Share on other sites More sharing options...
yunus Posted December 21, 2013 Share Posted December 21, 2013 I have found the solution. The tpl file to modify is addhomefeatured and not homefeatured. Link to comment Share on other sites More sharing options...
vekia Posted December 21, 2013 Share Posted December 21, 2013 so you use different module named addhomefeatured? am I right? Link to comment Share on other sites More sharing options...
yunus Posted December 21, 2013 Share Posted December 21, 2013 Yes. The theme doesn't use the standard module homefeatured. Thank you for your responses. Link to comment Share on other sites More sharing options...
mitzayapa Posted April 25, 2015 Share Posted April 25, 2015 Hello everyone. iºm trying to add 2 rows to my featured products block , but theres no way to make it work. my webpage is http://www.computersottocosto.com/ Theres no way to make it work. Can anybody help? Link to comment Share on other sites More sharing options...
Recommended Posts