From 8df7259e6a4b5b4f035f520240504343ce49eda0 Mon Sep 17 00:00:00 2001 From: merdan Date: Fri, 23 Dec 2022 14:33:24 +0500 Subject: [PATCH] cart_item resource --- .../Sarga/API/Http/Resources/Customer/OrderItemResource.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/Sarga/API/Http/Resources/Customer/OrderItemResource.php b/packages/Sarga/API/Http/Resources/Customer/OrderItemResource.php index 2ceb742e4..e0423711b 100644 --- a/packages/Sarga/API/Http/Resources/Customer/OrderItemResource.php +++ b/packages/Sarga/API/Http/Resources/Customer/OrderItemResource.php @@ -31,9 +31,9 @@ class OrderItemResource extends JsonResource 'qty_shipped' => (int) $this->qty_shipped, 'qty_refunded' => (int) $this->qty_refunded, 'price' => (double) $this->price, - 'formatted_price' => core()->formatPrice($this->price, $this->order->order_currency_code), + 'formatted_price' => core()->formatPrice($this->base_price, $this->order->order_currency_code), 'total' => (double) $this->total, - 'formatted_total' => core()->formatPrice($this->total, $this->order->order_currency_code), + 'formatted_total' => core()->formatPrice($this->base_total, $this->order->order_currency_code), 'total_invoiced' => (double) $this->total_invoiced, 'formatted_total_invoiced' => core()->formatPrice($this->total_invoiced, $this->order->order_currency_code), @@ -43,7 +43,7 @@ class OrderItemResource extends JsonResource 'discount_percent' => (double) $this->discount_percent, 'discount_amount' => (double) $this->discount_amount, - 'formatted_discount_amount' => core()->formatPrice($this->discount_amount, $this->order->order_currency_code), + 'formatted_discount_amount' => core()->formatPrice($this->base_discount_amount, $this->order->order_currency_code), 'discount_invoiced' => (double) $this->discount_invoiced, 'formatted_discount_invoiced' => core()->formatPrice($this->discount_invoiced, $this->order->order_currency_code),