From be9c2be864eacae73257ff65ab64e4e685d36242 Mon Sep 17 00:00:00 2001 From: merdan Date: Tue, 28 Jun 2022 16:02:17 +0500 Subject: [PATCH] order to manat --- packages/Sarga/API/Http/Controllers/IntegrationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Sarga/API/Http/Controllers/IntegrationController.php b/packages/Sarga/API/Http/Controllers/IntegrationController.php index 94b097c46..4a3abbd23 100644 --- a/packages/Sarga/API/Http/Controllers/IntegrationController.php +++ b/packages/Sarga/API/Http/Controllers/IntegrationController.php @@ -219,12 +219,12 @@ class IntegrationController extends Controller if(isset($data['sellable']) && $data['sellable']===false){ Log::info($data); //$attribute = $this->attributeRepository->findOneByField('code', 'status'); status id = 8 - $this->attributeValueRepository->updateOrCreate(['product_id'=>$product->id,'attribute_id'=>8],['boolean_value'=>0]); + $this->attributeValueRepository->updateOrCreate(['product_id'=>$product->id,'attribute_id'=>8],['boolean_value'=>1]); }else{ $originalPrice = Arr::get($data, 'price.originalPrice.value'); $discountedPrice = Arr::get($data, 'price.discountedPrice.value'); - $this->attributeValueRepository->updateOrCreate(['product_id'=>$product->id,'attribute_id'=>8],['boolean_value'=>1]); + $this->attributeValueRepository->updateOrCreate(['product_id'=>$product->id,'attribute_id'=>8],['boolean_value'=>0]); if($discountedPrice >= $originalPrice){ $this->attributeValueRepository->updateOrCreate(['product_id'=>$product->id,'attribute_id'=>11],['float_value'=>$discountedPrice]);// price id 11 $this->attributeValueRepository->updateOrCreate(['product_id'=>$product->id,'attribute_id'=>13],['float_value'=>null]);//special price id 13