@include('layouts.header')
{{-- No sidebar on craft page --}}
{{-- Showing count --}}
Showing {{ $start_count }}–{{ $end_count }} of {{ $products->total() }} results
{{-- OPTIONAL: Sort dropdown (only if you want) --}}
{{-- PRODUCTS GRID (same as shop) --}}
@php $currency = session('currency_shortcut', 'USD'); $symbol = session('currency_symbol', '$'); $rate = session('currency_rate', 1); @endphp @forelse($products as $product) @php $base = $product->product_amount ?? 0; $price = $base * $rate; if ($currency === 'AED') { $formattedPrice = number_format($price, 2) . ' ' . $symbol; } else { $formattedPrice = $symbol . ' ' . number_format($price, 2); } $img = $product->image_1 ?: asset('img/shop/shop-1.jpg'); @endphp
@if(!empty($product->is_new))
New
@endif
{{ $product->product_name }}
{{ $formattedPrice }}
@empty

No craft products found.

@endforelse {{-- Showing & Pagination (reuse same block we made for shop) --}}
Showing {{ $start_count }}–{{ $end_count }} of {{ $products->total() }} results
@php $current = $products->currentPage(); $last = $products->lastPage(); $startPages = [1, 2]; $endPages = [$last-1, $last]; $middlePages = [ $current - 2, $current - 1, $current, $current + 1, $current + 2 ]; $pages = collect(array_merge($startPages, $middlePages, $endPages)) ->filter(fn($p) => $p >= 1 && $p <= $last) ->unique() ->sort() ->values(); @endphp @if($current > 1) @endif @for($i = 0; $i < count($pages); $i++) @if($i > 0 && $pages[$i] != $pages[$i - 1] + 1) ... @endif {{ $pages[$i] }} @endfor @if($current < $last) @endif
@include('layouts.footer')
+