4

I want to display all of my category image with in home page. What should i do for this?
I am using CE:1.9.2.4

  • Welcome to Magento SE. The "with custom CSS" part of your question is confusing. What exactly do you need to know? How to add custom CSS to the home page? How to create a template for the home page? How to load categories? Please be more specific and explain what you already tried. – Fabian Schmengler Aug 26 '16 at 6:51
0

try this,

$_helper = Mage::helper('catalog/category');
$_categories = $_helper->getStoreCategories();

$cats = array();

function getCats($_categories)
{
    global $cats;
    foreach ($_categories as $_category) {
        if($_category->getIsActive()) {         
            echo "url ->".$_category->getUrl()."<br>";
            echo "name->".$_category->getName()."<br>";
            echo "id->".$_category->getId()."<br>";
            $childCats = $_category->getChildrenCategories();
            if (count($childCats) > 0) getLowestCats($childCats);
        }
    }
}
getCats($_categories);

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.