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,