vegaskev Posted May 30, 2014 Share Posted May 30, 2014 (edited) USING PRESTASHOP 1.6 > Default Theme Good day PrestaShop Vets! I'm trying to figure out how to change the featured products from 4 columns per row to 3 columns per row in displayHome. I'm using displayLeftColumn as a sidebar of sorts and 4 columns of products is just too much. Following the instructions of another thread (it's a dead thread, so I'm starting a fresh one), I changed the following in modules/homefeatured/views/templates/hook/homefeatured.tpl to a value of '3' ... {assign var='nbItemsPerLine' value=4} Unfortunately, it made no change. I then inspected element in chrome and noticed by the classes, that it's still thinking it's working with 4 columns....I say this because it still has the following class assigned to every 4th ajax_block_product li class... 'last-in-line' I was hoping that wouldn't be the case, as I would just need to modify some css, but unfortunately, even if I do resize the product classes to fit 3 per column, I'm going to have to add a float to every fourth product to "hack" the css. I want to avoid doing css hacks for the sake of hacking css and would much rather learn how to make this module function the way I desire. Thanks in advance, I appreciate your assistance & guidance. Edited June 6, 2014 by vegaskev (see edit history) Link to comment Share on other sites More sharing options...
vegaskev Posted June 2, 2014 Author Share Posted June 2, 2014 Bump Please Link to comment Share on other sites More sharing options...
vekia Posted June 2, 2014 Share Posted June 2, 2014 what theme you use? everything depends on it Link to comment Share on other sites More sharing options...
vegaskev Posted June 3, 2014 Author Share Posted June 3, 2014 Vekia, sorry, i could've sworn that I put it at the top before publishing the post. I updated my post just now to state PrestaShop 1.6 > Default Theme Link to comment Share on other sites More sharing options...
vegaskev Posted June 5, 2014 Author Share Posted June 5, 2014 what theme you use? everything depends on it Original post updated a couple of days ago @vekia. Any guidance, advice, code snippets, etc. would be greatly appreciated. Thanks in advance. Using the prestashop 1.6 default-bootstrap theme Link to comment Share on other sites More sharing options...
PSfever.com Posted June 5, 2014 Share Posted June 5, 2014 Hi, from what I can see it looks like you'll need to edit the product-list first... {if isset($products) && $products} {include file="$tpl_dir./product-list.tpl" class='homefeatured tab-pane' id='homefeatured' active=$active_ul} {else} 1 Link to comment Share on other sites More sharing options...
dioniz Posted June 5, 2014 Share Posted June 5, 2014 Open yourtheme/product-list.tpl and find this code: {if $page_name !='index' && $page_name !='product'} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=3} {else} {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} {/if} change to: {if $page_name !='index' && $page_name !='product'} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=3} {else} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=3} {/if} 1 Link to comment Share on other sites More sharing options...
vegaskev Posted June 6, 2014 Author Share Posted June 6, 2014 yo @PSFever.com & @dioniz much appreciated folks. Solution worked like a charm. It would've taken me a quite a bit to figure out which file those conifgs were in. u2 rock! Link to comment Share on other sites More sharing options...
Recommended Posts