]> _ Git - pmi.git/commitdiff
done #3033 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Sep 2019 06:53:53 +0000 (08:53 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Sep 2019 06:53:53 +0000 (08:53 +0200)
app/Models/Product.php
routes/backpack/custom.php

index 43fbd4e9b903c26d211cb2f38f7e742ae52c9992..af76904d0b7e3e38488651ae9794faa59b2a8bf3 100644 (file)
@@ -292,7 +292,7 @@ class Product extends CubistMagicPageModel
             } else if ($specEntity->type == 'text') {
                 $specValue = trim($val);
             } else if ($specEntity->type == 'range') {
-                if (!$val['first'] && !$val['second']) {
+                if (!isset($val['first']) || !isset($val['second']) || (!$val['first'] && !$val['second'])) {
                     continue;
                 }
                 $specValue = $val['first'] . ' ' . __('à') . ' ' . $val['second'] . ' ' . $specEntity->unit;
index 63455e102c092da2c05abca316e4e837bdaea54d..53bcf04be3c79c2c9464e807c3498f1dc17b46a8 100644 (file)
@@ -24,11 +24,6 @@ Route::group([
         Route::match(['delete'], 'page/{id}/media/{mediaId}', 'PageCrudController@deleteMedia');
         Route::match(['post'], 'page/{id}/media/reorder', 'PageCrudController@reorderMedia');
     });
-    CRUD::resource('product', 'ProductCrudController')->with(function () {
-        Route::match(['post'], 'product/{id}/media', 'ProductCrudController@uploadMedia');
-        Route::match(['delete'], 'product/{id}/media/{mediaId}', 'ProductCrudController@deleteMedia');
-        Route::match(['post'], 'product/{id}/media/reorder', 'ProductCrudController@reorderMedia');
-    });
     CRUD::resource('producttype', 'ProductTypeCrudController')->with(function () {
         Route::match(['post'], 'producttype/{id}/media', 'ProductTypeCrudController@uploadMedia');
         Route::match(['delete'], 'producttype/{id}/media/{mediaId}', 'ProductTypeCrudController@deleteMedia');