Merge branch 'levest_merge' into dev

This commit is contained in:
Rodney Figaro 2017-06-07 11:23:33 +02:00
commit 1a760d8bf0

View File

@ -5,6 +5,7 @@ class Category extends CategoryCore
const CATEGORY_LEVEL_BRANDS = 3;
const CATEGORY_HOME = 2;
const CATEGORY_BRAND_ROYKIN = 59;
const CATEGORY_RANGE_COLLECTION = 3;
const CATEGORY_RANGE_ORIGINAL = 8;
@ -49,6 +50,7 @@ class Category extends CategoryCore
public static function getDefaultSubCategory($id_category, $on_notfound_use_firstsubcategory = false, $context = null)
{
/*
if (empty(self::$default_sub_category_ids)) {
self::$default_sub_category_ids = array(
self::CATEGORY_HOME => self::CATEGORY_BRAND_ROYKIN,
@ -59,7 +61,7 @@ class Category extends CategoryCore
if (isset(self::$default_sub_category_ids[$id_category])) {
return self::$default_sub_category_ids[$id_category];
}
*/
if ($on_notfound_use_firstsubcategory) {
return self::getFirstSubCategory($id_category, $context);
}
@ -161,6 +163,7 @@ class Category extends CategoryCore
return $brand_ids_for_category_ids;
}
public static function getCategoriesTree($id_parent, $currentDepth = 0, $depth = 3, $context = null)
{
if (!$context) {