@php $items = $getRecord() ->cartItems() ->with(['salable']) ->get(); @endphp
@forelse ($items as $item) @php $salable = $item->salable; $sku = $salable?->sku ?? null; $legacyCode = $salable?->legacy_code ?? null; $color = null; $size = null; if ($salable && method_exists($salable, 'color')) { $color = $salable->color?->name; } if ($salable && method_exists($salable, 'size')) { $size = $salable->size?->name; } @endphp @empty @endforelse
Producto Cantidad Precio Unitario Total
{{ $item->name }}
@if ($sku || $legacyCode || $color || $size)
@if ($sku)
SKU: {{ $sku }}
@endif @if ($legacyCode)
Código: {{ $legacyCode }}
@endif @if ($color)
Color: {{ $color }}
@endif @if ($size)
Talla: {{ $size }}
@endif
@endif
{{ $item->qty }} ${{ number_format((float) $item->price, 2, '.', ',') }} ${{ number_format((float) $item->price * (int) $item->qty, 2, '.', ',') }}
No hay artículos en este pedido.