I have a list of category names, and I was wondering if there a way in Magento to lookup the category id using the name? Please advise the easiest way to do this.


Regina Nickles,you can do this by loadByAttribute();

For single category:


For getting multiple categories

$collection = Mage::getModel('catalog/category')->getCollection()

 $allIds = $collection->getAllIds();
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.