fix on article based on old merchandise
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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 = [])
|
||||
|
||||
Reference in New Issue
Block a user