Posted By

TioSolid on 10/08/10


Tagged

magento


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jplr


Get a list of store Categories


 / Published in: PHP
 

Return a list of all store Categories

  1. $category = Mage::getModel('catalog/category');
  2. $tree = $category->getTreeModel();
  3. $tree->load();
  4.  
  5. $ids = $tree->getCollection()->getAllIds();
  6. $arr = array();
  7.  
  8. if ($ids){
  9. foreach ($ids as $id){
  10. $cat = Mage::getModel('catalog/category');
  11. $cat->load($id);
  12. var_dump($cat);
  13. }

Report this snippet  

You need to login to post a comment.