如何在Magento类别页面上制作行有4个产品而不是3个

I'm new to magento.

I've been trying to change from a 3 products per row layout to a 4 products per row layout.

I've been searching but I can't find any solution.

Here's my closest approach: I changed "app/design/frontend/default/mytemplate/template/catalog/product/list.phtml" and set '$_columnCount=4'.

The problem is that I still receive 9 products each time, so I get 2 rows with 4 products each but the last one only has 1 product.

Any help would be appreciated. Thanks in advance.

You can determine the column count through layout/catalog.xml

Find the line that looks like this:

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

Change the value of 4 to 3.

Go to System > Configuration > Catalog > Frontend

Set Products per Page on Grid Allowed Values = 12,18,30

Set Products per Page on Grid Default Value = 12

Save

try following this. it worked. https://magento.stackexchange.com/questions/12899/display-more-items-per-row-in-products-page

and also make sure that your list.phtml layout is coded accordingly.

I was working on a custom theme, for mobile view. my requirement was to show two products in a row and by default it was four. I just widened the li product-item and this worked for me.

>ol.product-items{
    >li.product-item{
        border:@border-1;
        width: 45%;
    }
}
  • Changing the width can also affect product listing.

Try to set column count for both anchor and non-anchor layout handle in the catalog.xml.