Forked from pierreandreroy/get_all_categories.php
Last active
August 29, 2015 14:22
-
-
Save RowanBurgess-zz/c1ea61f085943d1eb431 to your computer and use it in GitHub Desktop.
Revisions
-
pierreandreroy revised this gist
Dec 23, 2013 . No changes.There are no files selected for viewing
-
pierreandreroy renamed this gist
Dec 23, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
pierreandreroy created this gist
Dec 23, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ <?php $categories = Mage::getModel('catalog/category')->getCollection() ->addAttributeToSelect('id') ->addAttributeToSelect('name') ->addAttributeToSelect('url_key') ->addAttributeToSelect('url') ->addAttributeToSelect('is_active'); foreach ($categories as $category) { if ($category->getIsActive()) { // Only pull Active categories $entity_id = $category->getId(); $name = $category->getName(); $url_key = $category->getUrlKey(); $url_path = $category->getUrl(); } } ?>