From c7e9f0fa8095cbef5150e4f8ce1c805d3ab7047b Mon Sep 17 00:00:00 2001 From: merdan Date: Thu, 21 Apr 2022 17:06:22 +0500 Subject: [PATCH] discounted configurables --- packages/Sarga/API/Http/Resources/Catalog/Product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index 38ae9f42a..187652aa1 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/Product.php +++ b/packages/Sarga/API/Http/Resources/Catalog/Product.php @@ -218,9 +218,9 @@ class Product extends JsonResource // Log::info($this->variants); if( $special_variant = $this->variants->where('min_price','<','max_price')->sortBy('min_price')->first()){ $data = array_merge($data, [ - 'special_price' => (double)$special_variant->min_price, + 'special_price' => core()->convertPrice($special_variant->min_price), 'formatted_special_price' => core()->currency($special_variant->min_price), - 'regular_price' => (double)$special_variant->price, + 'regular_price' => core()->convertPrice($special_variant->price), 'formatted_regular_price' => core()->currency($special_variant->price), ]); }