Change the Number of Columns in Product Grid – Magento 1.4

Written by Adrian Hart

Topics: Magento

In Magento the default number of columns in the Product Grid view is 3.

This is fine for a 3 column layout. If you creating a custom layout, however, you may need to change the number of columns (or Column Count). This is how you do it.

In the catalog.xml file in your skin’s Layout folder look for this line:

<block type=”catalog/product_list_upsell” name=”product.info.upsell” as=”upsell_products” template=”catalog/product/list/upsell.phtml”>

Copy the line below it:

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

In these sections in catalog.xml:

<!– Category default layout –>
<!– Category layered navigation layout –>

Look for the following and paste your copied line AFTER it:

<block type=”catalog/product_list” name=”product_list” template=”catalog/product/list.phtml”>

And that’s it!

Obviously, if you want 5 columns, change the number between the <columns> tags.

2 Comments Comments For This Post I'd Love to Hear Yours!

  1. Thanks for steering me in the right direct. I implemented your change in local.xml (CE 1.6.2). I like to do everything possible there … here’s what I added …

    4

    4

Leave a Comment Here's Your Chance to Be Heard!