How to change the number of columns in Magento catalog grid

In: Feeling guru|Techie Daw

31 Jan 2013

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:

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.

2 Responses to How to change the number of columns in Magento catalog grid



July 24th, 2013 at 8:51 pm

Sometimes magento truly makes me crazy! Thanks for the short tutorial. Short but constructive ๐Ÿ˜‰



September 20th, 2013 at 11:42 pm

Thanks a bunch, this is definitely the most elegant way to solve the problem.

Comment Form

About my blog

This blog is targeted towards all levels of developers and also designers. Various topics are discussed such as Magento, PHP & MySQL, jQuery, WordPress, CSS and HTML.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 5,247 other subscribers

WordPress + Magento

Recent Trackbacks



All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or my mom.