@php $data=getProductInfo($product); use App\Models\Information; use App\Models\BanglaText; $info = Information::first(); $bangla_text = BanglaText::first(); @endphp
Product Images @if($product->after_discount > 0 || $product->stock_quantity == 0 || $product->stock_quantity == null)
@if($product->after_discount > 0) @php $price = $product->sell_price; $afterDiscount = $product->after_discount; // absolute discount amount $discountAmount = $price - $afterDiscount; // discount percentage $discountPercent = $price > 0 ? round(($discountAmount / $price) * 100, 0) : 0; @endphp
{{$discountPercent}} % Off
@endif @if($product->stock_quantity == 0 || $product->stock_quantity == null)
STOCK OUT
@endif
@endif
{{ $product->name }}
@php $curr = $info->currency; @endphp @if($curr == 'BDT') ৳ {{ (int)$data['price'] }} @elseif ($curr == 'Dollar') $ {{ $data['price'] }} @elseif ($curr == 'Euro') {{ $data['price'] }} @elseif ($curr == 'Rupee') {{ $data['price'] }} @else @endif @if($product->after_discount > 0) @php $curr = $info->currency; @endphp @if($curr == 'BDT') {{ (int)$data['old_price'] }} @elseif ($curr == 'Dollar') $ {{ $data['old_price'] }} @elseif ($curr == 'Euro') {{ $data['old_price'] }} @elseif ($curr == 'Rupee') {{ $data['old_price'] }} @else @endif @endif
@if($product->type=="single")
@csrf @if($product->after_discount != '0') @else @endif
@else
@endif