This commit is contained in:
jitendra 2019-11-07 15:28:10 +05:30
parent faef8adcdb
commit 45815b7230
2 changed files with 3 additions and 4 deletions

View File

@ -281,7 +281,7 @@ class ProductController extends Controller
{
$data = request()->all();
if (!isset($data['massaction-type'])) {
if (! isset($data['massaction-type'])) {
return redirect()->back();
}

View File

@ -159,9 +159,8 @@ abstract class AbstractType
$product->update($data);
foreach ($product->attribute_family->custom_attributes as $attribute) {
if ($attribute->type == 'boolean') {
$data[$attribute->code] = isset($data[$attribute->code]) ? 1 : 0;
}
if ($attribute->type == 'boolean')
$data[$attribute->code] = isset($data[$attribute->code]) && $data[$attribute->code] ? 1 : 0;
if (! isset($data[$attribute->code]) || (in_array($attribute->type, ['date', 'datetime']) && ! $data[$attribute->code]))
continue;