This commit is contained in:
merdan 2022-04-07 14:58:13 +05:00
parent 924d06a968
commit 44a3cde96a
1 changed files with 4 additions and 4 deletions

View File

@ -297,7 +297,7 @@ class ProductRepository extends WProductRepository
'sku' => $parentProduct->sku,
'price' => Arr::get($data, 'price.discountedPrice.value'),
'name' => $data['name'],
'weight' => $data['weight'],
'weight' => $data['weight'] ?? 0.45,
'source' => $data['url_key'],
'status' => 1,
'visible_individually' => 1,
@ -347,7 +347,7 @@ class ProductRepository extends WProductRepository
'name' => $colorVariant['name'],
'size' => $this->getAttributeOptionId('size', $sizeVariant['size']),
'price' => $sizeVariant['price'],
'weight' => 0,
'weight' => $colorVariant['weight'] ?? 0.45,
'status' => 1,
'visible_individually' => 1,
'url_key' => $variant->sku,
@ -366,7 +366,7 @@ class ProductRepository extends WProductRepository
'color' => $this->getAttributeOptionId('color', $colorVariant['color']),
'name' => $colorVariant['name'],
'price' => Arr::get($colorVariant, 'price.discountedPrice.value'),
'weight' => 0,
'weight' => $colorVariant['weight'] ?? 0.45,
'status' => 1,
'visible_individually' => 1,
'url_key' => $variant->sku,
@ -387,7 +387,7 @@ class ProductRepository extends WProductRepository
'size' => $this->getAttributeOptionId('size', $sizeVariant['size']),
'name' => $data['name'],
'price' => $sizeVariant['price'],
'weight' => 0,
'weight' => $data['weight'] ?? 0.45,
'status' => 1,
'featured'=> 0,
'new' => 1,