@extends('layouts.app') @section('title', __('Your bag')) @section('content') @php $m = $shop->money; @endphp

{{ __('Your bag') }}

@if ($cart['lines'] === []) @foreach ($cart['notes'] as $n)
{{ $n }}
@endforeach {{ __('Start shopping') }} @else
@foreach ($cart['notes'] as $n)
{{ $n }}
@endforeach @if ($threshold) @php $left = max(0, $threshold - $cart['subtotal']); $pct = min(100, $threshold > 0 ? $cart['subtotal'] / $threshold * 100 : 100); @endphp

{{ $left > 0 ? __('Add :amount more for free delivery', ['amount' => $m->format($left)]) : __('You\'ve unlocked free delivery') }}

@endif @foreach ($cart['lines'] as $l)
@include('partials.line-thumb', ['image' => $l->image])
{{ $l->name }}

{{ collect([$l->color, $l->size])->filter()->implode(' - ') }}

@unless ($l->ok)

{{ $l->stock > 0 ? __('Only :n left', ['n' => $l->stock]) : __('Sold out') }}

@endunless

{{ $m->format($l->line_total) }}

@csrf @method('PATCH') {{ $l->quantity }}
@csrf @method('DELETE')
@endforeach
@endif
@push('scripts') @endpush @endsection