fix on article based on old merchandise

This commit is contained in:
Ludovic CANDELLIER
2023-03-27 21:05:37 +02:00
parent 20b3521c72
commit 0a6b90b434
3 changed files with 8 additions and 3 deletions

View File

@@ -29,6 +29,8 @@ class CategoryController extends Controller
// $product_type = Articles::getProductTypeByCategory($category_id);
// dump($product_type);
$article_nature = $request->input('article_nature');
// dump($article_nature);
// exit;
switch ($article_nature) {
case 'semences':
@@ -46,11 +48,14 @@ class CategoryController extends Controller
default:
$product_type = 'botanic';
$article_nature_id = 1;
$article_nature = 'semences';
break;
}
// $product_type = ArticleNatures::getProductType($article_nature_id);
// dump($product_type);
// dump($article_nature_id);
}
// exit;
$data = [
'category' => Categories::getFull($category_id),
'breadcrumb' => Categories::getAncestorsByCategory($category_id),

View File

@@ -321,7 +321,7 @@ class Articles
];
break;
}
return $data;
return $data ?? false;
}
public static function getInheritedImagesByProduct($product_id, $product_type)
@@ -337,7 +337,7 @@ class Articles
$data['images'] = Merchandises::getImages($product_id);
break;
}
return $data;
return $data ?? false;
}
public static function getMeta(&$data = [])

View File

@@ -1,4 +1,4 @@
@if (count($article['inherited'] ?? []))
@if (($article['inherited'] ?? false) && count($article['inherited'] ?? []))
@component('components.layout.box-collapse', [
'id' => 'product_description_box',
'title' => 'Informations héritées',