@if(Cookie::get('shopping_cart')) @php $total="0" @endphp
{{--@foreach ($cart_data as $data)--}} {{--
--}} {{--
--}} {{-- --}} {{--
--}} {{-- Product 1--}} {{--
--}} {{--
--}} {{-- {{ $data['item_name'] ?: '' }}--}} {{--
--}} {{-- @if(!empty($data['item_prod_variation_id']))--}} {{--

--}} {{-- {{ $data['variation_unit_name'] ?? '—' }} :--}} {{-- {{ $data['variation_qty'] ?? '—' }} tablets (£{{ number_format($data['item_price'], 2) }} each)--}} {{--

--}} {{-- @else--}} {{--

Standard Product

--}} {{-- @endif--}} {{--
--}} {{--
--}} {{--
--}} {{-- @if(empty($data['item_prod_variation_id']))--}} {{-- --}}{{-- ✅ Normal product: increment/decrement --}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{--
--}} {{-- --}} {{--
--}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{-- @else--}} {{-- --}}{{-- ✅ Variation product: dropdown --}} {{-- --}} {{-- @endif--}} {{-- --}}{{-- ✅ Show total --}} {{-- --}} {{-- £ {{ number_format(($data['item_quantity'] ?? 1) * ($data['item_price'] ?? 0), 2) }}--}} {{-- @php $total += ($data["item_quantity"] * $data["item_price"]) @endphp--}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--@endforeach--}} @foreach ($cart_data as $data)
{{ $data['item_name'] }}
{{ $data['item_name'] ?: '' }}
{{-- Variation or Brand Option Info --}} @if(!empty($data['item_prod_variation_id']))

{{ $data['variation_unit_name'] ?? '—' }} : {{ $data['item_tablet_count'] ?? '—' }} tablets (£{{ number_format($data['item_price'], 2) }} each)

@elseif(!empty($data['item_brand_option_id']))

{{ $data['brand_option_name'] ?? 'Brand Option' }} : {{ $data['item_tablet_count'] ?? 1 }} units (£{{ number_format($data['item_price'], 2) }} each)

@else

Standard Product

@endif
{{-- Quantity Selector --}} @if(empty($data['item_prod_variation_id']) && empty($data['item_brand_option_id'])) {{-- Normal product: increment/decrement --}}
@else {{-- Variation or Brand Option: dropdown --}} @endif {{-- Total Price --}} £ {{ number_format(($data['item_quantity'] ?? 1) * ($data['item_price'] ?? 0), 2) }} @php $total += ($data["item_quantity"] * $data["item_price"]) @endphp {{-- Delete Button --}}
@endforeach
Order Summary
Subtotal £ {{ number_format($total, 2) }}
Shipping £4.99

Total £ {{ number_format($total, 2) }}
Payment
@if (Auth::user()) @else @endif
@endif