Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Olav van Schie committed Dec 13, 2015
2 parents 70f5269 + 539b000 commit 17cfef4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/code/community/Ovs/Magefaker/Model/Source/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ public function toOptionArray($addEmpty = true){
}

$depth = 6;
$parentId = 1;
$store = Mage::app()->getWebsite(true)->getDefaultGroup()->getDefaultStoreId();
$rootId = Mage::app()->getStore($store)->getRootCategoryId();

$category = Mage::getModel('catalog/category');
$categories = $category->getCategories($parentId, $depth, TRUE, FALSE, TRUE);
$categories = $category->getCategories(($rootId - 1), $depth, true, false, true);

foreach ($categories as $node) {

Expand Down

0 comments on commit 17cfef4

Please sign in to comment.