@php
$currency = session('currency_shortcut', 'USD'); // USD / AED / INR
$symbol = session('currency_symbol', '$'); // $, AED, ₹
$rate = session('currency_rate', 1); // conversion rate
@endphp
@forelse($products as $product)
@php
// base price (INR in DB)
$base = $product->product_amount ?? 0;
// convert
$price = $base * $rate;
// format with currency
if ($currency === 'AED') {
$formattedPrice = number_format($price, 2) . ' ' . $symbol;
} else {
$formattedPrice = $symbol . ' ' . number_format($price, 2);
}
$img = $product->image_1 ?: asset('img/shop/shop-1.jpg');
@endphp
@endforelse
Showing {{ $start_count }}–{{ $end_count }} of {{ $products->total() }} results
{{-- Custom Pagination --}}