@foreach ($flash_deal->flash_deal_products as $key => $flash_deal_product) @php $products = \App\Models\Product::find($flash_deal_product->product_id); @endphp
@if($products->current_stock >= 1) @else @endif thumbnail_img) }} height="250px" alt="Laptop">

{{ $products->category->name }}

{{ $products->name }}
@php $prignalprice=$products->unit_price; $descount=$products->discount; $price=$prignalprice-$descount; @endphp @php $choices = []; if($products->choice_options){ $rawChoices = json_decode($products->choice_options, true); foreach($rawChoices as $choice){ $choices[] = [ 'attribute_id' => $choice['attribute_id'], 'attribute_name' => \App\Models\Attribute::find($choice['attribute_id'])->name ?? '', 'values' => $choice['values'] ];}} @endphp
Rs: {{ number_format($price,2) }}
{{ number_format($products->unit_price,2) }}
@endforeach
@section('modal') @include('frontend.modal.addtocartmodal') @endsection @section('script') @endsection