আমাদের পণ্যসমূহ
সব দেখুন →
@foreach($products as $product)
@php
$_origPrice = $product->price;
$_salePrice = $product->sale_price ?? null;
$_hasDiscount = $_salePrice && $_salePrice < $_origPrice;
$_discountPct = $_hasDiscount ? round(($_origPrice - $_salePrice) / $_origPrice * 100) : 0;
$_inStock = !isset($product->stock_quantity) || $product->stock_quantity > 0;
@endphp
{{-- Image --}}
{{-- Wishlist Button (UI only, no backend logic added) --}}
{{-- Sale Badge --}}
@if($_hasDiscount)
{{-- Content --}}
@endforeach
-{{ $_discountPct }}%
@endif
{{-- Out of Stock Overlay --}}
@unless($_inStock)
Out of Stock
@endunless
@if(!empty($product->category?->name))
@endif
{{-- Price --}}
{{ $product->category->name }}
@endif{{ $product->name }}
{{-- Rating --}} @if(!empty($product->average_rating))
@for($i = 1; $i <= 5; $i++)
@endfor
({{ $product->reviews_count ?? 0 }})
@if($_hasDiscount)
৳{{ number_format($_salePrice) }}
৳{{ number_format($_origPrice) }}
@else
৳{{ number_format($_origPrice) }}
@endif
{{-- Add to Cart --}}