Magento: Adding a list of categories as a single category block to Magento

Magento is missing per default a categories block, so you have to code it on your own. For this knowledge of the language php or better 😉 might be required.
First we need to change the layout in the file of your magenta installation (assuming that we use the Theme WEBBLAZER):

add the following line to this file

to insert the categories in the left sidebar.

Now we need to create our category.phtml file, just place it in the following path:

and insert the next block of code

be careful the replace the placeholder __REPLACE_WITH_YOUR_ROOT_CATEGORY__ with your root category. Which would be in our case 42.

Thats it – you now should have a list of all subcategories of your root category 42 in the left sidebar.

References:
[1] http://www.devinrolsen.com/magento-custom-category-listing-block/
[2] http://thinkclay.com/technology/magento-display-categories-in-sidebar
[3] http://stackoverflow.com/questions/4273898/how-to-sort-a-category-list-array-alphabetically-in-magento

Related Posts

Eclipse: convert upper case text to lower case and viceversa with a simple shortcut

simple

November 7, 2012

Development, Java

No Comment

This is just a quick post to share these 2 little shortcuts to convert text from lower case to uppercase and vice-versa in Eclipse. Lower case: CTRL+SHIFT+Y (CMD+SHIFT+Y on Mac OS X) Upper case: CTRL+SHIFT+X (CMD+SHIFT+X on Mac OS X) Camel case: Anyone knows a shortcut? You can select one or more characters to convert.

Read More

OpenERP: Connect Kettle to OpenERP

[1] http://kettle.pentaho.com [2] http://ci.pentaho.com/view/Data%20Integration/job/Kettle/ [3] http://apps.openerp.com/addon/1833?filter=%7B%22order_by%22%3A+%22click_counter+desc%22%2C+%22author%22%3A+78%7D&page=0 [4] http://erpmoldeo.wordpress.com/2011/02/10/openerp-kettle-and-terminatooor/ [5] http://www.akretion.com/en/products-and-services/openerp-kettle-bi-connector-terminatooor [6] http://forums.pentaho.com/showthread.php?98831-Asking-OpenERP-module-for-pentaho-data-integration-(Kettle)

Read More

Leave a Reply