diff --git a/app/Http/Controllers/Shop/Admin/ArticleController.php b/app/Http/Controllers/Shop/Admin/ArticleController.php index 4926dd87..4c9cb55b 100644 --- a/app/Http/Controllers/Shop/Admin/ArticleController.php +++ b/app/Http/Controllers/Shop/Admin/ArticleController.php @@ -28,7 +28,10 @@ class ArticleController extends Controller public function store(Request $request) { - Articles::storeFull($request->all()); + $data = $request->all(); + dump($data); + exit; + Articles::storeFull($data); return redirect()->route('Shop.Admin.Articles.index'); } diff --git a/app/Repositories/Shop/ArticlePrices.php b/app/Repositories/Shop/ArticlePrices.php index 1c3b6d02..aac3f414 100644 --- a/app/Repositories/Shop/ArticlePrices.php +++ b/app/Repositories/Shop/ArticlePrices.php @@ -41,6 +41,9 @@ class ArticlePrices public static function storePrices($article_id, $prices) { + dump($article_id); + dump($prices); + exit; if ($prices) { foreach ($prices as $key => $price) { $price['article_attribute']['article_attribute_value_id'] = $price['attribute']['attribute_value_id']; diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php index 5eeda1c1..6bd97dd5 100644 --- a/app/Repositories/Shop/Articles.php +++ b/app/Repositories/Shop/Articles.php @@ -39,7 +39,7 @@ class Articles public static function getMeta(&$data = []) { - $data['products'] = ($data['product_type'] == 'App\Models\Botanic\Variety') ? Varieties::getOptionsWithSpecie() : Species::getOptions(); + $data['products'] = ( ($data['product_type'] ?? false) == 'App\Models\Botanic\Variety') ? Varieties::getOptionsWithSpecie() : Species::getOptions(); $data['categories_options'] = Categories::getOptions(); $data['price_generics'] = PriceGenericCategories::getOptionsWithChildrens(); $data['families_options'] = ArticleFamilies::getOptions(); diff --git a/resources/views/Shop/Admin/Articles/partials/generic_prices/block_generic_price_new.blade.php b/resources/views/Shop/Admin/Articles/partials/generic_prices/block_generic_price_new.blade.php index 81906018..b04a8520 100644 --- a/resources/views/Shop/Admin/Articles/partials/generic_prices/block_generic_price_new.blade.php +++ b/resources/views/Shop/Admin/Articles/partials/generic_prices/block_generic_price_new.blade.php @@ -1,7 +1,5 @@