@extends('frontend.layouts.app') @section('content')
{{ $menu->name }}
{{ $products->count() }} item{{ $products->count() > 1 ? 's' : '' }} found
@if($products->count())
@foreach ($products as $product) @php // মূল দাম $originalPrice = (float) ($product->price ?? 0); // ✅ আসল discount column ব্যবহার করছি $offerPrice = (float) ($product->discount_price ?? 0); // offer থাকলে: discount_price > 0 এবং price এর চেয়ে কম $hasOffer = $offerPrice > 0 && $offerPrice < $originalPrice; // কার্ডে যে current/sale price দেখাবো $salePrice = $hasOffer ? $offerPrice : $originalPrice; // পুরনো দাম (strike-through) – শুধুই offer থাকলে $oldPrice = $hasOffer ? $originalPrice : null; @endphp @endforeach
@else
No products found.

Please check back later or browse another category.

@endif
@endsection @push('style') @endpush @push('script') @endpush