//获取所有激活状态的分类模型集合
$categories = Mage::getModel( 'catalog/category' )->getCollection()
->addAttributeToSelect( '*' )
->addIsActiveFilter();
//循环Collection,并填充数组,可以根据需要的数据进行填充,本例以分类ID作为key,对应的值作为value
$allCategory = array ();
foreach ( $allCategory as $category ) {
$all [ $category ->getId()] = $category ->getName();
}
return $allCategory ;
}