Magento: 通过category name获取category信息
$cat = Mage::getResourceModel('catalog/category_collection')->addFieldToFilter('name', 'Category_Name_Here');
print_r($cat->getData());
To get the category id from $cat object, simply use:
$cat->getFirstItem()->getEntityId();
(责任编辑:好模板) |