{{-- Product list is wrapped in a stable container so themes can position it independently of the order summary (e.g. reorder the checkout on mobile). --}}
{!! apply_filters(RENDER_PRODUCTS_IN_CHECKOUT_PAGE, $products) !!}
@php $cartSubTotal = Cart::instance('cart')->rawSubTotal(); $cartTax = Cart::instance('cart')->rawTax(); $hasShipping = ! empty($shipping) && Arr::get($sessionCheckoutData, 'is_available_shipping', true) && $shippingAmount > 0; $hasDiscount = $couponDiscountAmount > 0 || $promotionDiscountAmount > 0; $hasPaymentFee = isset($paymentFee) && $paymentFee > 0; $showSubtotal = $cartSubTotal != $orderAmount || $cartTax > 0 || $hasShipping || $hasDiscount || $hasPaymentFee; @endphp {{-- Order summary (subtotal, discounts, fees, total) wrapped so it can be positioned independently of the product list. --}}
@if ($showSubtotal)

{{ __('Subtotal') }}:

{{ $cartSubTotal == 0 ? trans('plugins/ecommerce::ecommerce.free') : format_price($cartSubTotal) }}

@endif {!! apply_filters('ecommerce_checkout_after_subtotal', null, $products) !!} @if (EcommerceHelper::isTaxEnabled() && $cartTax > 0)

{{ __('Tax') }}:

{{ format_price($cartTax) }} @if ($cartTax && EcommerceHelper::isDisplayCheckoutTaxInformation()) ({{ Cart::instance('cart')->taxClassesName() }}) @endif

@endif @if (session('applied_coupon_code'))

{{ __('Coupon code') }}:

{{ session('applied_coupon_code') }}

@endif @if ($couponDiscountAmount > 0)

{{ __('Coupon code discount amount') }}:

{{ format_price($couponDiscountAmount) }}

@endif @if ($promotionDiscountAmount > 0)

{{ __('Promotion discount amount') }}:

{{ format_price($promotionDiscountAmount) }}

@endif @if (!empty($shipping) && Arr::get($sessionCheckoutData, 'is_available_shipping', true))

{{ __('Shipping fee') }}:

{{ $shippingAmount > 0 ? format_price($shippingAmount) : trans('plugins/ecommerce::order.free_shipping') }}

@endif @if (isset($shippingTaxAmount) && (float) $shippingTaxAmount > 0)

{{ trans('plugins/ecommerce::order.shipping_tax') }}:

{{ format_price($shippingTaxAmount) }}

@endif @if (isset($paymentFee) && $paymentFee > 0)

{{ __('plugins/payment::payment.payment_fee') }}:

{{ format_price($paymentFee) }}

@endif

{{ __('Total') }}:

{{ $orderAmount == 0 ? trans('plugins/ecommerce::ecommerce.free') : format_price($orderAmount) }}