@extends('ecommerce::layout.store-layout') {{-- @section bodies are evaluated BEFORE the parent layout runs, so $isRTL has to be resolved here rather than relying on the value store-layout computes. --}} @php $isRTL = $isRTL ?? in_array(app()->getLocale(), ['ar', 'he', 'fa', 'ur'], true); @endphp @section('title', __('ecommerce::ecommerce.checkout')) @section('page-styles') @endsection @section('content') @php $checkoutVatRate = (float) ($cart->cartItems->first()?->item?->merchant?->country?->vat ?? 0); $checkoutDeliveryFee = $cart->service_type_id == 2 ? 0 : (float) $cart->delivery_fee; $checkoutVatLabel = rtrim(rtrim(number_format($checkoutVatRate, 2, '.', ''), '0'), '.'); @endphp

@lang('ecommerce::ecommerce.checkout')

@lang('ecommerce::ecommerce.checkout_message')

@if (session('error'))
{{ session('error') }}
@endif @if (session('success'))
{{ session('success') }}
@endif
@csrf

@lang('ecommerce::ecommerce.order_items')

@foreach ($cart->cartItems as $item)
{{ $item->item?->title ?? 'Product' }}
{{ $item->item?->title ?? '#' }}
@lang('ecommerce::ecommerce.product_label')
x {{ $item->qty }} {{ \App\Domain\AppBase\Models\Setting\Currency::format($item->subtotal) }}
@endforeach

@lang('ecommerce::ecommerce.shipping_details')

@lang('ecommerce::ecommerce.address')

@if ($addresses->isEmpty())

@lang('ecommerce::ecommerce.no_address_found')

@else
@foreach ($addresses as $address) @endforeach
@endif
@error('new_address_title') {{ $message }} @enderror
@error('new_address_country_id') {{ $message }} @enderror
@error('new_address_city_id') {{ $message }} @enderror
@error('new_address_district_id') {{ $message }} @enderror
@error('new_address_address') {{ $message }} @enderror
@error('address_id') {{ $message }} @enderror

@lang('ecommerce::ecommerce.order_notes')

@endsection @section('scripts') @endsection