fix on empty shelve

This commit is contained in:
Ludovic CANDELLIER
2022-04-25 20:46:18 +02:00
parent 904110d10f
commit c77db883c2
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ class Categories
public static function getCategoryTreeVisibles($sale_channel_id = false) public static function getCategoryTreeVisibles($sale_channel_id = false)
{ {
// return self::getModel()->defaultOrder()->visible()->hasAvailableOffers($sale_channel_id)->get()->toTree(); // return self::getModel()->defaultOrder()->visible()->hasAvailableOffers($sale_channel_id)->get()->toTree();
return self::getModel()->defaultOrder()->visible()->get()->toTree(); return self::getModel()->defaultOrder()->hasAvailableOffers()->visible()->get()->toTree();
} }
public static function getChildren($data, $withFolder = false) public static function getChildren($data, $withFolder = false)

View File

@@ -11,7 +11,7 @@ class Categories
public static function getByHomepage() public static function getByHomepage()
{ {
return Category::visible()->homepage()->orderBy('name', 'asc')->get(); return Category::hasAvailableOffers()->visible()->homepage()->orderBy('name', 'asc')->get();
} }
public static function getAll() public static function getAll()