@extends('theme.master') @section('title', 'Cart') @section('content') @include('admin.message') {{ __('frontstaticword.ShoppingCart') }} @php $item = App\Cart::where('user_id', Auth::User()->id)->get(); if(count($item)>0){ echo count($item); } else{ echo "0"; } @endphp Courses in Cart @if(count($item)>0) @foreach($carts as $cart) @if($cart->course_id != NULL) @if($cart->courses['preview_image'] !== NULL && $cart->courses['preview_image'] !== '') @else @endif @else @if($cart->bundle['preview_image'] !== NULL && $cart->bundle['preview_image'] !== '') @else @endif @endif @if($cart->course_id != NULL) {{ str_limit($cart->courses->title, $limit = 50, $end = '...') }} {{ $cart->courses->user->fname }} @else {{ str_limit($cart->bundle->title, $limit = 50, $end = '...') }} {{ $cart->bundle->user->fname }} @endif {{ csrf_field() }} {{ __('frontstaticword.Remove') }} {{ csrf_field() }} {{ __('frontstaticword.AddtoWishlist') }} @php $currency = App\Currency::first(); @endphp @if($cart->offer_price == !NULL) {{ $cart->offer_price }} {{ $cart->price }} @else {{ $cart->price }} @endif @if($cart->disamount == !NULL) @if(Session::has('coupanapplied')) @endif @endif @endforeach @if(! $carts->isEmpty()) @php $cartitems = App\Cart::where('user_id', Auth::User()->id)->first(); @endphp @if ($cartitems == NULL) {{ __('frontstaticword.empty') }} @else {{ __('frontstaticword.Total') }}: {{ __('frontstaticword.TotalPrice') }}{{ $price_total }} {{ __('frontstaticword.OfferDiscount') }}- {{ $price_total - $offer_total }} {{ __('frontstaticword.CouponDiscount') }} @if( $cpn_discount == !NULL) - {{ $cpn_discount }} @else {{ __('frontstaticword.ApplyCoupon') }} @endif {{ __('frontstaticword.DiscountPercent') }}{{ round($offer_percent, 0) }}% Off {{ __('frontstaticword.Total') }}:{{ $cart_total }} {{ csrf_field() }} {{ __('frontstaticword.Checkout') }} @endif {{ csrf_field() }} {{ __('frontstaticword.Apply') }} @if(Session::has('fail')) × {{ Session::get('fail') }} @endif @if(Session::has('coupanapplied')) {{ csrf_field() }} {{Session::get('coupanapplied')['msg']}} @endif @endif @else {{ __('frontstaticword.cartempty') }} {{ __('frontstaticword.KeepShopping') }} @endif {{ __('frontstaticword.CouponCode') }} × {{ csrf_field() }} {{ __('frontstaticword.Apply') }} @if(! $carts->isEmpty()) @php $cpns = App\Coupon::get(); @endphp @foreach($cpns as $cpn) {{ $cpn->code }} @endforeach @endif @endsection