From 31e61f04172debde5c28d389471d41487dab272f Mon Sep 17 00:00:00 2001 From: merdan Date: Thu, 22 Sep 2022 13:28:53 +0500 Subject: [PATCH] menu Controller --- .../API/Http/Resources/Catalog/Product.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index 6e005436c..c6ec9452a 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/Product.php +++ b/packages/Sarga/API/Http/Resources/Catalog/Product.php @@ -92,15 +92,15 @@ class Product extends JsonResource 'price' => (double) core()->convertPrice($typeInstance->getMinimalPrice()), 'formatted_price' => core()->currency($typeInstance->getMinimalPrice()), - -// 'special_price' => $this->when( -// $typeInstance->haveSpecialPrice(), -// (double) core()->convertPrice($typeInstance->getSpecialPrice()) -// ), -// 'formatted_special_price' => $this->when( -// $typeInstance->haveSpecialPrice(), -// core()->currency($typeInstance->getSpecialPrice()) -// ), +//todo remove special price + 'special_price' => $this->when( + $typeInstance->haveSpecialPrice(), + (double) core()->convertPrice($typeInstance->getSpecialPrice()) + ), + 'formatted_special_price' => $this->when( + $typeInstance->haveSpecialPrice(), + core()->currency($typeInstance->getSpecialPrice()) + ), 'regular_price' => $this->when( $typeInstance->haveSpecialPrice(), (double) core()->convertPrice($typeInstance->getMaximumPrice())