{{-- Columna Izquierda: Formulario de Checkout --}}
@guest @include('cart::livewire.checkout.partials._customer-details-form') @include('cart::livewire.checkout.partials._address-form') @endguest @auth @include('cart::livewire.checkout.partials._address-selection') @if ($showNewAddressForm || $customerAddresses->isEmpty())
@include('cart::livewire.checkout.partials._address-form')
@endif @endauth {{-- Sección de Métodos de Envío --}} @include('cart::livewire.checkout.partials._shippment-methods-selection') {{-- Sección de Métodos de Pago --}} @unless ($quotationMode) @include('cart::livewire.checkout.partials._payment-methods-selection') @endunless
{{-- Columna Derecha: Resumen del Carrito --}}

Resumen del Carrito

@if ($cart && count($cart?->cartItems ?? [])) {{-- Productos del carrito --}}
@foreach ($cart->cartItems as $item)
{{-- Imagen --}}
{{ $item->salable->getLabel() }}
{{-- Cantidad --}} {{ $item->qty }}
{{-- Info --}}

{{ $item->salable->getLabel() }}

@if ($item->salable->getVariantDescription())

{{ $item->salable->getVariantDescription() }}

@endif @if ($item->qty > 1)

{{ $item->qty }} × ${{ number_format($item->price, 2, '.', ',') }}

@endif
{{-- Precio --}}

${{ number_format($item->price * $item->qty, 2, '.', ',') }}

@endforeach
Subtotal ${{ number_format($cart->subtotal, 2, '.', ',') }}
IVA 16% ${{ number_format($this->ivaAmount, 2, '.', ',') }}
@unless ($quotationMode)
Envío ${{ number_format($cart->shippment ?? 0, 2, '.', ',') }}
@endunless {{-- Desglose de Ofertas/Cupones --}} @if ($cart->offers->count() > 0)
@foreach ($cart->offers as $offer)
{{ $offer->name }} @if ($offer->coupon_code) ({{ $offer->coupon_code }}) @endif -${{ number_format($offer->amount, 2, '.', ',') }}
@endforeach
@endif
Gran total ${{ number_format($cart->total, 2, '.', ',') }}
Número de artículos: {{ $cart->qty ?? 0 }}
@else

No hay carrito activo.

@endif !$this->canProcessCheckout, ]) wire:click="processCheckout" :disabled="!$this->canProcessCheckout"> {{ $quotationMode ? 'Enviar cotización' : 'Proceder al Pago' }}