Currently encountered a problem with catalog/category_collection.
When I'm trying to get category id by it's name it returns wrong category ID.
Anyone else had this problem and know a fix? I tried reindexing data, clearing cache nothing helps.
$category = Mage::getResourceModel('catalog/category_collection')->addFieldToFilter('name', $name); $cat = $category->getData(); $id = $cat[entity_id];
Anyone maybe know an alternative to this code?