0

My categories are displayed this way:
- Main Category
  - Product type
    - Brand

I want to display the image of the third level category on the homepage. Can anyone help me?

0

You can use the following to load the category:

$_category = Mage::getModel('catalog/category')->load(89);

Replace 89 with the ID of the category you are interested in loading, then you will have access to the full range of attributes belonging to that category including the Image (if any) associated to it.

0

Test it, it's my nav code (without div) :

<?php
$layer = Mage::getSingleton('catalog/layer');
$_category = $layer->getCurrentCategory();
$currentCategoryId= $_category->getId();
$_helper = Mage::helper('catalog/category');
$_categories = $_helper->getStoreCategories();
$currentCategory = Mage::registry('current_category');

if (count($_categories) > 0){
foreach($_categories as $_category){ 
  $_category = Mage::getModel('catalog/category')->load($_category->getId()); 
  $_subcategories = $_category->getChildrenCategories();

  if (count($catList) > 0){ 
    $subcat=0

    foreach($catList as $_subCategory){ 
    $_subSubCat = Mage::getModel('catalog/category')->load($_subCategory['id']);
    $_subSubCategories = $_subSubCat->getChildrenCategories();

      if (count($subCatList) > 0){ 
        foreach($subCatList as $_subSubCat){ 
        echo $_subSubCat->getName();                             
      }; 
    };
    };  
    }; 
  }; 
}; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.