@if(count($products) > 0)

One Last Chance Sale

@endif {{-- @dd($products) --}}
@foreach ($products as $product) @php $isInWishlist = $wishlist->contains('product_id', $product->product_id); @endphp @php $mrp = $product->variations[0]->mrp ?? $product->base_mrp; $price = $product->variations[0]->price ?? $product->base_price; $percentOff = $mrp > 0 && $price > 0 ? round((($mrp - $price) / $mrp) * 100) : 0; @endphp
Sale {{ $percentOff }}% Off Product image Product image
@if (count($product->variations) == 1 && $product->variations[0]->stock == 0) Out of stock @else add to cart @endif

{{ $product->product_name }}

₹{{ number_format($price, 2, '.', ',') }} ₹{{ number_format($mrp, 2, '.', ',') }}
@endforeach {{--
@if ($productCount >= $take && $productCount > 5 ) @endif