From e1dcfb1de2e4b8ea718ebfb9c0912858986ae5be Mon Sep 17 00:00:00 2001 From: merdan Date: Thu, 21 Apr 2022 14:18:27 +0500 Subject: [PATCH] discounted configurables --- packages/Sarga/API/Http/Resources/Catalog/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index 69a6a1629..21f804f2f 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/Product.php +++ b/packages/Sarga/API/Http/Resources/Catalog/Product.php @@ -216,7 +216,7 @@ class Product extends JsonResource // 'variants' => ProductVariant::collection($product->variants) 'variants_count' => $this->variants->count(), 'color_count' => $this->variants->groupBy('color')->count(), - $this->when(!empty($special_variant), [ + $this->when(empty($special_variant), [ 'special_price' => $special_variant->special_price, 'formatted_special_price' => core()->currency($special_variant->special_price), 'regular_price' => $special_variant->price,