This commit is contained in:
Ludovic CANDELLIER
2022-06-14 22:24:24 +02:00
parent 8b334bc8ed
commit b2987e5eed
4 changed files with 21 additions and 6 deletions

View File

@@ -228,7 +228,14 @@ class Articles
$model = $search ? $model->search($search) : $model;
$model = $article_nature_id ? $model->byArticleNature($article_nature_id) : $model;
$model = $article_nature_ids ? $model->byArticleNatures($article_nature_ids) : $model;
$model = ($product_type == 'botanic') ? $model->botanic() : $model->merchandise();
switch ($product_type) {
case 'botanic':
$model = $model->botanic();
break;
case 'merchandise':
$model = $model->merchandise();
break;
}
return $model;
}