The default Magento catalog grid is set to display 3 products per column. Most users alter the number of columns by modifying the file catalog/product/list.phtml. There’s actually a much cleaner approach to this task and you only need to modify an XML file.

Open the catalog.xml file which can be found in the location below:
/app/design/frontend/<package-name>/<theme>/layout/catalog.xml

Locate the line that declares the block for product listing similar to the one below:
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">

Immediately after the code above, add the XML node below:
<action method="setColumnCount"><columns>4</columns></action>

Save the file and clear the contents of your var/cache directory. Reload the catalog page to see the changes 🙂

Note: You can also apply this to catalogsearch.xml or any layout XML file that uses the list.phtml

About the author

Richard Feraro is a Magento Enterprise Certified developer from Manila, Philippines with 14 years of solid open-source development experience using Linux, Apache, MySQL & PHP.

By Richard Feraro

Richard Feraro is a Magento Enterprise Certified developer from Manila, Philippines with 14 years of solid open-source development experience using Linux, Apache, MySQL & PHP.

2 thoughts on “How to change the number of columns in Magento catalog grid”

Leave a Reply