fixed product variables

This commit is contained in:
Edward Yang 2023-07-19 09:29:50 +08:00
parent a1ba2917f8
commit c07bdda87f
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class ProductService
$data['brand_id'] = (int) ($data['brand_id'] ?? 0);
$data['position'] = (int) ($data['position'] ?? 0);
$data['weight'] = (float) ($data['weight'] ?? 0);
$data['variables'] = json_decode($data['variables'] ?? '');
$data['variables'] = json_decode($data['variables'] ?? '[]');
$product->fill($data);
$product->updated_at = now();
$product->save();