@if(isset($item->courses))
{{ substr(strip_tags($item->courses->detail), 0, 90)}}{{strlen(strip_tags($item->courses->detail))>90 ? '...' : ""}}
Discount : {{ $item->discount }}% ({{ $item->discount_type }})
@php
$mainprice = 0;
if($item->courses->discount_price != '0'){
echo sprintf("%.2f",$item->courses->discount_price);
}else{
echo sprintf("%.2f",$item->courses->price);
}
$sellprice = $item->courses->discount_price != 0 ? $item->courses->discount_price : $item->courses->price;
$discount = $item->discount;
$discount_type = $item->discount_type;
$discounted_amount = 0;
if($discount_type == 'upto'){
$random_no = rand(0,$discount);
$discounted_amount = $sellprice * $random_no / 100;
}else{
$discounted_amount = $sellprice * $discount / 100;
}
$deal_price = $sellprice - $discounted_amount;
@endphp
{{ substr(strip_tags($item->courses->detail), 0, 100)}}{{strlen(strip_tags($item->courses->detail))>100 ? '...' : ""}}
Discount : {{ $item->discount }}% ({{ $item->discount_type }})
@php
$mainprice = 0;
if($item->courses->discount_price != '0'){
echo sprintf("%.2f",$item->courses->discount_price);
}else{
echo sprintf("%.2f",$item->courses->price);
}
$sellprice = $item->courses->discount_price != 0 ? $item->courses->discount_price : $item->courses->price;
$discount = $item->discount;
$discount_type = $item->discount_type;
$discounted_amount = 0;
if($discount_type == 'upto'){
$random_no = rand(0,$discount);
$discounted_amount = $sellprice * $random_no / 100;
}else{
$discounted_amount = $sellprice * $discount / 100;
}
$deal_price = $sellprice - $discounted_amount;
@endphp