{{-- Filters Bar --}}
{{-- Category Button --}} {{-- Active Category Badge --}} @if($categoryId)
{{ $categories->firstWhere('id', $categoryId)?->name ?? 'Category' }}
@endif {{-- Search Tag --}} @if($search)
"{{ $search }}"
@endif
{{ $products->total() }} products
{{-- Loading --}}
Loading products...
{{-- Products Grid --}}
@if($products->count() > 0)
@foreach($products as $product) @php $hasVariants = $product->has_variants && $product->activeVariations->count() > 0; $priceRange = $product->getPriceRange(); $currentStock = $product->getCurrentStock(); $inStock = $hasVariants ? $product->hasAnyVariationInStock() : $product->isInStock(); $isNew = $product->created_at >= now()->subDays(14); $inWishlist = in_array($product->id, $wishlist); $discount = $product->getDiscountPercent(); @endphp
{{-- Image --}}
@if($product->getPrimaryImageUrl()) {{ $product->name }} @else
@endif
{{-- Badges --}}
@if($isNew) New @endif @if($discount && !$hasVariants) -{{ $discount }}% @endif
{{-- Wishlist --}} {{-- Stock --}} @if(!$inStock)
Out of Stock
@elseif(!$hasVariants && $currentStock > 0 && $currentStock <= 5) Only {{ (int)$currentStock }} left! @endif
{{-- Content --}}
@if($hasVariants) {{ $product->activeVariations->count() }} options @endif {{ $product->name }}
@if($hasVariants && $priceRange['has_range']) ₹{{ number_format($priceRange['min']) }} - ₹{{ number_format($priceRange['max']) }} @else ₹{{ number_format($product->sale_price) }} @if($product->mrp && $product->mrp > $product->sale_price) ₹{{ number_format($product->mrp) }} @endif @endif
{{-- Button --}} @if(!$inStock) @elseif($hasVariants) View Options @else @endif
@endforeach
{{-- Load More --}} @if($products->hasMorePages())
@endif @else

No products found

Try adjusting your search or filters

@if($search || $categoryId) @endif
@endif
{{-- Populate Sidebar Categories --}}