{{-- One cart line. $line is a Lunar\Models\CartLine (iteration var set by @each in cart-body). The two forms post through bbk-cart-controller (fetch + method spoofing) and the response re-renders cart-body. --}} @php $variant = $line->purchasable; $product = $variant?->product; $name = $product?->translateAttribute('name') ?? $variant?->sku ?? '—'; // The variant's own image (falls back to the product's thumbnail // internally — see ProductVariant::getThumbnail()) — the specific option // the shopper picked, not just the product in general. $thumb = $variant?->getThumbnailImage() ?: null; $variantLabel = $variant?->getOption(); // Not routed through checkout::'s own locale-explicit convention — this // is a storefront route, so it follows the storefront's own (implicit // locale) call shape, same as App\Catalog\ProductCard. Carries the // variant id along so the product page can restore the same option the // shopper actually has in their cart, not just default to the first one // (see product-form-controller.js reading ?variant= on connect()). $productUrl = $product ? route('product.show', ['id' => $product->id, 'variant' => $variant?->id]) : null; @endphp
  • @if ($thumb) @if ($productUrl) @else {{ $name }} @endif @endif
    @if ($productUrl) {{ $name }} @else

    {{ $name }}

    @endif @if ($variantLabel)

    {{ $variantLabel }}

    @endif @include('checkout::partials.line-custom-fields', ['line' => $line])

    {{ $line->unitPrice?->formatted() }}

    @csrf @method('PATCH')

    {{ $line->subTotal?->formatted() }}

    @csrf @method('DELETE')