@foreach($products as $key => $value)
{{-- Discount badge --}}
@if($value->old_price)
@php
$discount = (($value->old_price - $value->new_price) * 100) / $value->old_price;
@endphp
{{ number_format($discount,0) }}%
ছাড়
@endif
{{-- Product image --}}
{{-- Product name --}}
{{-- Rating --}}
@php
$avg = $value->reviews->avg('ratting') ?? 0;
$full = floor($avg);
@endphp
@for($i=1; $i<=5; $i++)
@endfor
{{-- Price --}}
@if($value->old_price)
৳ {{ $value->old_price }}
@endif
৳ {{ $value->new_price }}
{{-- 🔥 TWO BUTTONS --}}
@if(!$value->prosizes->isEmpty() || !$value->procolors->isEmpty())
{{-- Variant product → details page --}}
অর্ডার করুন
@else
{{-- Simple product --}}
{{-- Order Now --}}
{{-- Add to Cart --}}
@endif
@endforeach