discounted configurables

This commit is contained in:
merdan 2022-04-23 14:30:21 +05:00
parent 43a8636e35
commit 3fa5f174aa
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ class CartResource extends JsonResource
return [
'id' => $this->id,
'shipping_method' => $this->shipping_method,
'shipping_rate' => new CartShippingRateResource($this->selected_shipping_rate),
'shipping_price' => $this->selected_shipping_rate->price ?? 0,
'formatted_shipping_price' => core()->formatPrice($this->selected_shipping_rate->base_price ?? 0, $this->cart_currency_code),
'coupon_code' => $this->coupon_code,
'is_gift' => $this->is_gift,
'items_count' => (int) $this->items_count,