Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
More than 3 products per row in Magento
 
thebrandammo
Jr. Member
 
Total Posts:  30
Joined:  2009-10-08
 

Hi all

Is there a way to change the default 3 products per row view in the magento category sections?

thanks

Version 1.4

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Use action name="setColumnCount" in the catalog layout file

 
Magento Community Magento Community
Magento Community
Magento Community
 
uogecko
Jr. Member
 
Total Posts:  9
Joined:  2009-01-08
 

My catalog.xml file has the following line:

<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
                    <
action method="setColumnCount"><columns>4</columns></action>
                    <
action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
                </
block>

That’s the only reference to setColumnCount that I can find and I’m unable to get more than 3 products on one line in the category view.  I have ruled out a width issue and can see in the HTML that a separate UL is created for product number 4 causing it to start on a new row.

What am I doing wrong?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vivekananthan
Member
 
Avatar
Total Posts:  44
Joined:  2009-06-17
 

Which version of magento are you using up?

Can you give me the link to your site so I can probably look at?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lanternwd
Member
 
Total Posts:  33
Joined:  2009-07-07
 

Hi, did this ever get resolved? I have the same issue, in Magento 1.4

 
Magento Community Magento Community
Magento Community
Magento Community
 
aboswell
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2010-04-25
SLC Utah
 

What worked for me was in catalog.xml right above:

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

I placed this code, like so:

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

There are 2 places that the “addColumnCountLayoutDepend” code exists. I just put the “setColumnCount” above both.

Flush the cache and I got 4 across.

 
Magento Community Magento Community
Magento Community
Magento Community
 
thezman
Jr. Member
 
Total Posts:  8
Joined:  2009-02-09
Gainesville, GA
 
aboswell - 01 May 2010 09:59 PM

What worked for me was in catalog.xml right above:

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

I placed this code, like so:

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

There are 2 places that the “addColumnCountLayoutDepend” code exists. I just put the “setColumnCount” above both.

Flush the cache and I got 4 across.

Tried everything in the book and this was the only solution that was VERY easy to implement and worked right off the bat. Preesh!

 
Magento Community Magento Community
Magento Community
Magento Community
 
abulic
Jr. Member
 
Total Posts:  1
Joined:  2008-05-03
 

+1
I searched for like 20 mins before finding this thread.  Brilliant, Aboswell - many thanks smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
timoffei
Jr. Member
 
Total Posts:  3
Joined:  2010-02-26
 

insert the following snippet inside the layout tag inside your local.xml file

<catalog_category_default>
        <
reference name="product_list">
            <
action method="setColumnCount"><columns>4</columns></action>
        </
reference>
    </
catalog_category_default>

    <
catalog_category_view>
        <
reference name="product_list">
            <
action method="setColumnCount"><columns>4</columns></action>
        </
reference>
    </
catalog_category_view>

    <
catalog_category_layered>
        <
reference name="product_list">
            <
action method="setColumnCount"><columns>4</columns></action>
        </
reference>
    </
catalog_category_layered>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Trilby
Member
 
Total Posts:  31
Joined:  2009-07-05
 

Under Category - Custom Design tab in the backend, I entered the following under Custom Layout Update:

<reference name="product_list">
<action method="setColumnCount"><columns>4</columns></action>
</reference>

I am using 2 columns with right bar as the Page Layout for the Category, and Magento version 1.5.0.1.

This worked!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeanpierre_nl
Jr. Member
 
Total Posts:  29
Joined:  2009-11-12
 
Trilby - 11 March 2011 07:32 AM

Under Category - Custom Design tab in the backend, I entered the following under Custom Layout Update:

<reference name="product_list">
<action method="setColumnCount"><columns>4</columns></action>
</reference>

I am using 2 columns with right bar as the Page Layout for the Category, and Magento version 1.5.0.1.

This worked!

Works perfectly for me in 1.3.2.4. No tempering with files neccesary. Excellent!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jhsdgjsdjhb
Jr. Member
 
Total Posts:  1
Joined:  2011-04-28
 

Thanks. Adding the line worked.
I changes my layout of page.xml to 2 colums and found that only 3 products were being shown in a row.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tonkberlin
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2010-10-15
Berlin
 
Trilby - 11 March 2011 07:32 AM

<reference name="product_list">
<action method="setColumnCount"><columns>4</columns></action>
</reference>

Question, i use the attribute promotion to show articles in a grid view on the home page.
How to change the grid view to 4 products? So that the system is creating a ul with 4 li’s.

The example(s) on the top does not work for me :(
Thanks!

Magento 1.5.1.1

Image Attachments
screenshot 2011-07-20 um 00.27.12.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
jtroump
Member
 
Total Posts:  49
Joined:  2011-04-11
 
Trilby - 11 March 2011 07:32 AM

Under Category - Custom Design tab in the backend, I entered the following under Custom Layout Update:

<reference name="product_list">
<action method="setColumnCount"><columns>4</columns></action>
</reference>

I am using 2 columns with right bar as the Page Layout for the Category, and Magento version 1.5.0.1.

This worked!

Excellent work! Well done!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
John_B
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2010-02-26
 

Thank you aboswell. Works like a charm! :-D

Maybe others run across the same problem: if you want search results with 4 columns: It works like described by aboswell, just that you have to insert it into your catalogsearch.xml so that the two occurrencies look like this:

<action method="setColumnCount"><columns>4</columns></action><action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
 
Magento Community Magento Community
Magento Community
Magento Community
 
zagirova
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-11-24
 

Doesn’t work for me - it changes on refresh but on another refresh 4 product per row become 3 again. Weird.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2