This commit is contained in:
Ludovic CANDELLIER
2022-04-13 23:49:48 +02:00
parent 6e133246cf
commit 9c2b9cf02e
56 changed files with 948 additions and 336 deletions

View File

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

View File

@@ -19,6 +19,15 @@ class ShopCart
];
}
public static function getSummary()
{
return [
'count' => self::count(),
'quantity' => self::getTotalQuantity(),
'total' => self::getTotal(),
];
}
public static function remove($id)
{
return self::get()->remove($id);

View File

@@ -486,5 +486,4 @@ class Articles
{
return self::update(['homepage' => $homepage], $id);
}
}