How to Display 4 Products in One Row on Magento Homepage

catalogproducts

I want to show 4 products in one row on my Magento site.
I tried some tricks but it doesn’t work..

I set this in list.phtml

<?php $_columnCount = 4; ?>

but nothing..

I also put this in catalog.xml

<action method="setColumnCount"><count>4</count></action>

Here is my list.phtml and my catalog.xml

This is my screenshot:

enter image description here

Best Answer

You can set the column count through the layout XML. I'm guessing your homepage is a CMS page so the block was probably added in the Design tab under Layout Update XML.

The XML syntax should look something like this for adding the list and setting the column count.

[...]
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
    <action method="setColumnCount"><count>4</count></action>
</block>
[...]
Related Topic