add methods to detect distinct product type et article nature on shelve

This commit is contained in:
Ludovic CANDELLIER
2023-04-01 22:01:15 +02:00
parent bc1cf1190b
commit 6649c32501
4 changed files with 59 additions and 10 deletions

View File

@@ -62,6 +62,12 @@ class CategoryController extends Controller
'display_by_rows' => $request->input('display_by_rows') ?? false,
'product_type' => $product_type,
'article_nature' => $article_nature,
'article_natures' => Articles::getArticleNaturesWithOffers([
'category_id' => $category_id,
]),
'product_types' => Articles::getProductTypesWithOffers([
'category_id' => $category_id,
]),
'tags_selected' => $request->input('tags') ?? [],
'articles' => Articles::getArticlesToSell([
'category_id' => $category_id,
@@ -71,8 +77,6 @@ class CategoryController extends Controller
]),
'tags' => TagGroups::getWithTagsAndCountOffers($category_id),
];
// dump($data);
// exit;
return view('Shop.Shelves.shelve', $data);
}