@if($products->count() > 0)
@foreach($products as $product)

id }},
name: '{{ addslashes($product->name) }}',
price: {{ $product->price }},
image: '{{ $product->image_url }}',
description: '{{ addslashes($product->description ?? '') }}',
stock: {{ $product->stock }},
unit: '{{ $product->unit }}',
pricing_type: '{{ $product->pricing_type }}',
min_quantity: {{ $product->min_quantity ?? 1 }}
})"
>
@if($product->stock <= 0)
Out of Stock
@elseif($product->stock <= 10)
Low Stock
@endif
{{ $product->name }}
${{ number_format($product->price, 2) }}
per {{ $product->unit }}
No products found
@if($search)
Try adjusting your search terms or filters.
@else
Check back later for new products.
@endif