Magento themes and extensions

Magento Custom Category Listing Block

Posted on March 30th, 2013 | Posted by admin

Magento Custom Category Listing Block

$cats = Mage::getModel('catalog/category')->load(2)->getChildren();
$catIds = explode(',',$cats);
<?php foreach($catIds as $catId): ?>
$category = Mage::getModel('catalog/category')->load($catId);
echo $category->getName();
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
$subCatIds = explode(',',$subCats);
<?php if(count($subCatIds) > 1):?>
<?php foreach($subCatIds as $subCat) :? >

Category List Not Working On Category Page – Magento?

Posted on March 25th, 2013 | Posted by admin

Category List Not Working On Category Page – Magento?

I have used the following code:


Shop by:


As you can see I added the 'remove name=left'. I need to have the left menu with the categories displaying on every page of the website and I need the products to show up when I click on the categories...

How to delete category from frontend in magento?

Posted on March 20th, 2013 | Posted by admin

Below code will delete particular category in magento.

 require_once realpath(dirname(__FILE__).'/app/Mage.php';
 Mage::app('default'); // Default or your store view name.
 Mage::register('isSecureArea', 1);// This will set secure area as admin
 $category = Mage::getModel('catalog/category')->load(15);//Here 15 is category id & it create category object
 $category->delete(); // This code will delete category whose id is 15

Hide a Magento Category

Posted on March 11th, 2013 | Posted by admin

Hide a Category from Magento Category Menu

This is another simple setting that took me a while to figure in the early day of Magento learning. Today someone asked me how to do it thus I’m entering it to our Magento Journal.

To hide a category menu, simply add a new subcategory (e.g: Sales) with following settings:

Is Active: No
Is Anchor: No

Then proceed to adding a new subcategory (e.g: Overstock Deals ) under the “Sales” category you have just created and set:

Get current category or product model in Magento

Posted on February 25th, 2013 | Posted by admin

How to get the current category or product model?

You may use the magento registry class like this:

//Get current category or product
Page 1 of 3123»