how to display three products per row in Magento, after a certain count the products are repeating itself. Please help


Please try with below step to do with per row products :

Goto app/design/frontend/<your_package><your_theme>/layout/catalog.xml.

Find the handle catalog_category_default and catalog_category_layered.

Put this line inside the block product_list_toolbar at very bottom

<action method="setColumnCount"><count>3</count></action>

Magento by default provides us a very good template for displaying different pages. It also provides a variety of layout files to display different pages with different layouts. But for our convenience, we need to do some modifications in the default layout of Magento.

One of the most common issue for product display is how to show 4 products instead of 3 in a row in Magento. Because Magento does not provide any functionality to change it from the admin side, we need to make it possible from our side i.e., by coding. We can easily change it by the help of an XML file.

Step:1 Open your XML file from this path app/design/frontend/default/YOUR_THEME/layout/catalog.xml

Step:2 In that file find out the code like this

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

Step:3 Add this line below it

<action method="setColumnCount"><columns>3</columns></action>

The above code will change the product count to 3.

You can use this code for catalog_category_default and catalog_category_layered to change the row count.

Hope it helps!!!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.