I want to be able to call through the API to get an array of all categories with details such as a URL key. This target at the end will be an array like this
$massage_cats=array( array("entity_id"=>78, "name"=>"Massage Oils and Tools", "url_key"=>"massage-oils-and-tools", "url_path"=>"essential-accessories/massage-oils-and-tools.html"), array("entity_id"=>79, "name"=>"Massage Oils", "url_key"=>"massage-oils", "url_path"=>"essential-accessories/massage-oils-and-tools/massage-oils.html") );
So, I would like to call something like
$massage_cats= array(); $allcats = Mage::getModel('catalog/cats?')->loadAll(); foreach($allcats $k=>$item){ array_push($massage_cats,$item->loadDetails()); }
I know that this is completely composed and does not comply with the API, but this is basically the goal. I need a conclusion, as I showed it. Ideas for code to meet your needs?
source share