on May 15, 2013
The 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:
catalog.xml file and locate the two instances of
Add the following code above the two instances of the code from Step 1.
<action method="setColumnCount"><columns>4</columns></action> <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
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.