The ability to change the number of columns in the product grid on Magento category pages from the default of 3 columns is very useful. It allows the display of more products per row and is very useful when developing custom Magento themes.
To change the number of columns on the Magento product grid, edit your catalog.xml layout file (remember to edit the layout file in your current theme or the changes won’t show) and use action name="setColumnCount" to set the number of columns. A guide for changing the number of columns to 4 is below:
Step 1
Open your catalog.xml file and locate the two instances of
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
Step 2
Add the following code above the two instances of the code from Step 1.
<action method="setColumnCount"><columns>4</columns></action>
Giving you
<action method="setColumnCount"><columns>4</columns></action> <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
Step 3
Flush the cache and your product category grid layout should update to 4 columns across.
Note
Remember to also update your catalogsearch.xml layout file in the same manner as described above if you want the number of columns in the search results grid to match the category pages.
{ 0 comments }


Magento Order Comments
May 17, 2013
This guide will detail how to install the Magemaven OrderComments extension as well as configure it for specific purposes.
1) The first step is to install the OrderComments extension via Magento connect. Go to the extension’s listing in the Magento Marketplace and click the install button. Once you have the extension key, open your Magento Connect Manager via the admin panel (System > Magento Connect > Magento Connect Manager) and install the extension.
Typically, this extension works out of the box, but with some custom themes that don’t support all of Magento’s features it is sometimes necessary to update your layout file(s). To do this, locate checkout.xml under
app/design/frontend/your_package/your_theme/layout. Open the file and look for the block typecheckout/onepage_review_info. Ensure that it contains the following code near the end:If you don’t see it the above code in your layout file, please add it just before the block named
checkout.onepage.review.button. Once added, the extension will work with your custom theme.Customers will now be provided with a text box labled “Order Comment” into which they can enter their comments. To see order comments in the Magento admin, go to Sales > Orders. Order comments will be listed in the far right column.
2) If you would like to change the default “Order Comment” label on the text box to read differently, such as changing it to “How did you hear about us?”, open
app/design/frontend/your_package/your_theme/template/ordercomment/checkout/and edit the agreements.phtml. Around line 21, locate the following code:<label for="ordercomment-comment"><?php echo Mage::helper('ordercomment')->__('Order Comment') ?></label>Change
'Order Comment'to'How did you hear about us?'(or whatever else you would like to label the box) and save the file.Voila, now you have a custom order comment box for your customers. We hope you found this tutorial helpful. If you are interested in jobs in the IT and telecommunications fields, please visit jobandtalent.
{ 0 comments }