Popular Posts

Thursday, 15 October 2015

How do you change the number of product columns

The line you wish to change is generated by this code:

<?php $_columnCount = $this->getColumnCount(); ?>

<ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col">
that you can find in this file:

// OPen list.phtml file

app\design\frontend\Your_Package\Your_Theme\template\catalog\product\list.phtml
One simple way to change the number of columns is to edit catalog.xml of your theme:

app/design/frontend/Your_Package/Your_Theme/layout/catalog.xml
Find and edit the line that says:

<action method="setColumnCount"><count>4</count></action>
Another simple way to change columns count with a custom layout section in the categories: In the Custom Design tab for a category, enter this code in the Custom Layout Update field:

<reference name="product_list">
    <action method="setColumnCount"><count>4</count></action>
</reference>
You can find further reference in this video: Change magento column count in products grid list

Another way would be to edit the list.phtml file and replace this line:

<?php $_columnCount = $this->getColumnCount(); ?>
with something like:

<?php $_columnCount = 6; ?>

No comments:

Post a Comment

Magento: How to get last order id

There are many ways to get last order id:   1. From checkout session: $lastOrderId = Mage::getSingleton('checkout/session'...