From 44a3cde96a84c867a59997ceb825af557a0429d4 Mon Sep 17 00:00:00 2001 From: merdan Date: Thu, 7 Apr 2022 14:58:13 +0500 Subject: [PATCH] fix mix --- .../Sarga/Shop/src/Repositories/ProductRepository.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/Sarga/Shop/src/Repositories/ProductRepository.php b/packages/Sarga/Shop/src/Repositories/ProductRepository.php index 3aecaecb6..6e3f23fa8 100644 --- a/packages/Sarga/Shop/src/Repositories/ProductRepository.php +++ b/packages/Sarga/Shop/src/Repositories/ProductRepository.php @@ -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,