$category_collection = Mage::getModel('catalog/category')->getCollection()
->setStoreId(1)
->addAttributeToSelect('name')
->addAttributeToSelect('url_path')
->addAttributeToSelect('is_active');
foreach($category_collection as $category) {
if ($category->getLevel() != 2) {
continue;
}
echo $category->getName();
echo $category->getId();
}
相关话题:
- 获取Magento顶级分类
- 获取Magento一级分类
- Magento所有分类
- Magento get All Categories
0 个评论
643 次阅读