@if(isset($basket)&& $basket->count()>0) @php $subtotal=0; $total=0; @endphp
    @foreach($basket as $item)
  • Vehicula vel tempus sit amet ulte
    {{ $price_now=($item ->product->discount_price ?? $item ->product -> price )}} @if($item -> product->discount_price) {{$item ->product-> price}} @endif
    {{ ($item ->size_id!="") ? App\models\Cart::getSize($item ->size_id)->name_ar : '' }}
    {{ ($item ->color_id!="") ? App\models\Cart::getColor($item ->color_id)->name_en : '' }}
    Qty:
    -
    +
    subtotal:
    @php $subTotal = ( $price_now * ($item->quantity)) @endphp {{ $subTotal}} @php $total+= $subTotal @endphp
  • @endforeach
There are ({{$basket -> count()}}) items in your cart

@if(Session::has('coupon_amount')) Coupon Amount: {{$coupon_amount=getCouponAamount(Session::get('coupon_code'),$total)}}$ @php $total=$total-$coupon_amount; @endphp @else Coupon Amount: 0$ @endif
Total: {{$total}}

@else

there is no items in your cart

@endif