Magento Web Development

Setting the Number of Columns to Display in Category Listing

Rushik Shah User Icon By: Rushik Shah

Magento is freely available e commerce software that has become very popular, very fast. E-commerce software is the buzzword now it is possible to find many different ecommerce software on the Internet. However Magento is one of the chosen ones; a great number of people wishing to have their online presence felt in the form of a shopping cart select Magento. It has many different modules already installed thus making it easy for the end user. There are however, loads of extensions available for you to install; to make Magento extra special. In addition to which it is also possible to add unique customized features with the assistance of a Magento Web developer.

Set Number Of Columns In Category Listing In Magento

It is possible to change the number of columns displayed in the category listing and this articles helps you do just that. You will first need to connect to the web server where Magento is installed via FTP. Once logged in you need to traverse to the directory, ‘app/design/frontend/default/<theme>/layout ‘Once loaded you need to download the file catalog.xml and edit it in your favourite editor.

Setting the Number of Columns to Display in Category Listing

First locate category settings. Here we will assume that the category listing page is currently displaying 3 columns.

<catalog_category_default translate=”label”>
<label>Catalog Category (Non-Anchor)</label>
<reference name=”right”>
<block type=”catalog/navigation” name=”catalog.leftnav” before=”-” template=”catalog/navigation/left.phtml”/>
</reference>
<reference name=”content”>
<block type=”catalog/category_view” name=”category.products” template=”catalog/category/view.phtml”>
<block type=”catalog/product_list” name=”product_list” template=”catalog/product/list.phtml”>
<block type=”catalog/product_list_toolbar” name=”product_list_toolbar” template=”catalog/product/list/toolbar.phtml”>
<block type=”page/html_pager” name=”product_list_toolbar_pager”/>
<!– The following code shows how to set your own pager increments –>
<!–
<action method=”setDefaultListPerPage”><limit>4</limit></action>
<action method=”setDefaultGridPerPage”><limit>9</limit></action>
<action method=”addPagerLimit”><mode>list</mode><limit>2</limit></action>
<action method=”addPagerLimit”><mode>list</mode><limit>4</limit></action>
<action method=”addPagerLimit”><mode>list</mode><limit>6</limit></action>
<action method=”addPagerLimit”><mode>list</mode><limit>8</limit></action>
<action method=”addPagerLimit” translate=”label”><mode>list</mode><limit>all</limit><label>All</label></action>
–>
</block>
<action method=”addColumnCountLayoutDepend”><layout>empty</layout><count>6</count></action>
<action method=”addColumnCountLayoutDepend”><layout>one_column</layout><count>5</count></action>
<action method=”addColumnCountLayoutDepend”><layout>two_columns_left</layout><count>4</count></action>
<action method=”addColumnCountLayoutDepend”><layout>two_columns_right</layout><count>4</count></action>
<action method=”addColumnCountLayoutDepend”><layout>three_columns</layout><count>3</count></action>
<action method=”setToolbarBlockName”><name>product_list_toolbar</name></action>
</block>
</block>
</reference>
</catalog_category_default>

To add the number of columns making it 4 instead of 3 you need to set the number of columns for the category product listing to 4 lacing the following new content in the file.

Thus place this:

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

Before

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

That is it you are done. But don’t forget to clear the cache. It is very important to clear the cache by going to the admin menu System Cache Management.

Feel free to contact our magento web developers team today.

Why Choose Alakmalak As a Your Growth Partner?

Looking to outsource Website Design & Development Work?

Alakmalak is a web development company in India that offers services for several technologies. There have been around for a very long time and have developed over 2500 projects for clients all around the world. They have highly skilled web developers with a great deal of experience.

  • How to change the number of columns in Magento
  • How to set number of columns in Magento

What’s Next ?

I know after reading such an interesting article you will be waiting for more. Here are the best opportunities waiting for you.

Share via
Copy link
Powered by Social Snap