benwiggy Posted November 18, 2014 Share Posted November 18, 2014 My Home page has Top Sellers tab on it, which displays a grid view of 4 products per row. My Products pages have 3 products per row in Grid View. How do I alter the Top Sellers tab to have the same number of products per row as the Products pages? Thanks Link to comment Share on other sites More sharing options...
LuckyModule Posted November 18, 2014 Share Posted November 18, 2014 My Home page has Top Sellers tab on it, which displays a grid view of 4 products per row. My Products pages have 3 products per row in Grid View. How do I alter the Top Sellers tab to have the same number of products per row as the Products pages? Thanks Hello, Change code in your file theme -product-list.tpl {*define numbers of product per line in other page for desktop*} {if $page_name !='category'} {if ($hide_left_column || $hide_right_column) && ($hide_left_column !='true' || $hide_right_column !='true')} {* left or right column *} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=2} {elseif ($hide_left_column && $hide_right_column) && ($hide_left_column =='true' && $hide_right_column =='true')} {* no columns *} {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} {else} {* left and right column *} {assign var='nbItemsPerLine' value=2} {assign var='nbItemsPerLineTablet' value=1} {assign var='nbItemsPerLineMobile' value=2} {/if} {else} {* category page *} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=2} {/if} 1 Link to comment Share on other sites More sharing options...
benwiggy Posted November 18, 2014 Author Share Posted November 18, 2014 (edited) Thanks. It's reduced the number, but hasn't increased the size to fit. There's just a "gap" where the fourth one was. How do I make them larger to fit the middle column? Edited November 18, 2014 by benwiggy (see edit history) Link to comment Share on other sites More sharing options...
benwiggy Posted November 19, 2014 Author Share Posted November 19, 2014 (edited) I really need these products displayed wider, as the text of the words is being clipped (not truncated, actually clipping a character in half!) I figure it's somewhere in this line (59) of product-list.tpl: <li class="ajax_block_product{if $page_name == 'index' || $page_name == 'product'} col-xs-12 col-sm-4 col-md-3{else} col-xs-12 col-sm-6 col-md-4{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}"> Edited November 19, 2014 by benwiggy (see edit history) Link to comment Share on other sites More sharing options...
benwiggy Posted December 2, 2014 Author Share Posted December 2, 2014 Anyone? 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