@extends('layouts.index') @section('content')

Shop

Orders
{{-- ═══════════════════════════════════════ WATER PRODUCTS SECTION ══════════════════════════════════════════ --}} @if ($packaged_products->count() > 0 || $refill_products->count() > 0)
{{-- ── TAB 1: Packaged Water ────────────────────── --}} @if($packaged_products->count() > 0)
@foreach ($packaged_products as $product) @php $hasVariants = $product->variants->count() > 0; if ($hasVariants) { $variants = $product->variants->where('variant_status', '!=', 'inactive'); $isDual = $variants->whereIn('selling_unit', ['bottle','pack'])->count() > 0; $anyStock = $variants->sum('variant_quantity') > 0; $minPrice = $variants->min('variant_price'); } else { $variants = collect([]); $isDual = false; $anyStock = $product->product_quantity > 0; $minPrice = $product->product_price; } @endphp
📦
{{ $product->product_name }} KES {{ number_format($minPrice, 2) }}
@if($hasVariants) @if($isDual) Bottle / Pack
@endif @if($anyStock) Choose Size @else No Stock @endif @else Stock: {{ $product->product_quantity }} @if($anyStock) Add to Cart @else Out of stock @endif @endif
@endforeach
@endif {{-- ── TAB 2: Refill Water ─────────────────────── --}} @if($refill_products->count() > 0)
@foreach ($refill_products as $refill)
@endforeach

Refills have no stock limit – they are served from the main tank.

@endif
{{-- tab-content --}}
@endif
{{-- box box-primary --}}
@csrf

Product Qty Subtotal
Cart is empty
Subtotal KES 0.00
Discount (%)
Total KES 0.00
@endsection @section('script') @endsection