/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private function getCategories() { $categories = Mage::getModel('catalog/category') ->getCollection() ->addAttributeToSelect('*') ->addIsActiveFilter(); foreach ($categories as $c) { $all[$c->getId()] = $c->getName(); } return $all; }