Magento — Change Category Product Grid Layout from 3 Columns to 4 Columns

Magento LogoThe ability to change the number of columns in the product grid on Magento category pages from the default of 3 columns is very useful. It allows the display of more products per row and is very useful when developing custom Magento themes.

To change the number of columns on the Magento product grid, edit your catalog.xml layout file (remember to edit the layout file in your current theme or the changes won’t show) and use action name="setColumnCount" to set the number of columns. A guide for changing the number of columns to 4 is below:

Step 1
Open your catalog.xml file and locate the two instances of

<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>

Step 2
Add the following code above the two instances of the code from Step 1.

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

Giving you

<action method="setColumnCount"><columns>4</columns></action>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>

Step 3
Flush the cache and your product category grid layout should update to 4 columns across.

Remember to also update your catalogsearch.xml layout file in the same manner as described above if you want the number of columns in the search results grid to match the category pages.

2 Comment on “Magento — Change Category Product Grid Layout from 3 Columns to 4 Columns

Leave a Reply

Your email address will not be published. Required fields are marked *