Jump to content

Want 6 products per line, getting 5?!


Recommended Posts

Hi,

 

I've re-configured product-list.tpl to display 6 products on the homepage, by using the following code:

	{if $page_name !='index' && $page_name !='product'}
		{assign var='nbItemsPerLine' value=4}
		{assign var='nbItemsPerLineTablet' value=2}
		{assign var='nbItemsPerLineMobile' value=3}
	{else}
		{assign var='nbItemsPerLine' value=6}
		{assign var='nbItemsPerLineTablet' value=3}
		{assign var='nbItemsPerLineMobile' value=2}
	{/if}

and

		<li class="ajax_block_product{if $page_name == 'index'} col-xs-12 col-sm-6 col-md-2 {elseif $page_name == 'product'} col-xs-12 col-sm-4 col-md-3 {else} col-xs-12 col-sm-6 col-md-3{/if}

I've set six products in the back office to the 'Home' category, but I'm only actually seeing 5 images displayed, formatted with space for a sixth.

 

Page link here: http://accessoriesforthehome.co.uk/prestashop/index.php

 

Frankly, I'm a bit stumped! It looks like the template changes are correct, but only 5 images are being shown.

 

Any help would be greatly appreciated.

Andrew

Link to comment
Share on other sites

  • 5 months later...

It works fine for grid view and i make 4 products in line, but when i switch to list view products are collapsing

 

 

 

And interesting moment when i switching back to grid view i get 3 products again. and i have to reload page.

ofcourse i turned on recompilation and cleared cache.

Link to comment
Share on other sites

  • 3 weeks later...

It works fine for grid view and i make 4 products in line, but when i switch to list view products are collapsing

if you want to display 4 products in the row you need to change not only product-list.tpl but also global.js

 

example if you change

col-xs-12 col-sm-6 col-md-4

to

col-xs-12 col-sm-6 col-md-3

in the product-list.tpl

do the same in the global.js

Link to comment
Share on other sites

×
×
  • Create New...