Trandy Products

@foreach($trandyproducts as $key => $tranproducts)
{{-- IMAGE --}}
@php $prignalprice = $tranproducts->unit_price; $descount = $tranproducts->discount; $price = $prignalprice - $descount; @endphp {{-- BODY --}}
{{ $tranproducts->category->name }}
{{ Str::limit($tranproducts->name, 45) }}
Rs {{ number_format($price,2) }}
@if($tranproducts->discount > 0) Rs {{ number_format($tranproducts->unit_price,2) }} @endif
{{-- ACTION BUTTONS --}} @php $choices = []; if($tranproducts->choice_options){ $rawChoices = json_decode($tranproducts->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
@endforeach
@section('modal') @include('frontend.modal.addtocartmodal') @endsection @section('script') @endsection