@extends('theme.master') @section('title', 'Cart') @section('content') @include('admin.message')

{{ __('frontstaticword.ShoppingCart') }}

@php if(Auth::check()) { $item = App\Cart::where('user_id', Auth::User()->id)->get(); } else{ } if($item != NULL){ echo count($item); } else{ echo "0"; } @endphp {{ __('frontstaticword.CoursesinCart') }}

@if($carts != NULL)
@auth @foreach($carts as $cart)
@if($cart->course_id != NULL) @if($cart->courses['preview_image'] !== NULL && $cart->courses['preview_image'] !== '') blog @else blog @endif @else @if($cart->bundle['preview_image'] !== NULL && $cart->bundle['preview_image'] !== '') blog @else blog @endif @endif
@if($cart->course_id != NULL)
{{ $cart->courses->user->fname }}
@else
{{ $cart->bundle->user->fname }}
@endif
{{ csrf_field() }}
{{ csrf_field() }}
    @if($cart->offer_price == !NULL)
  • {{ activeCurrency()->symbol }}{{ price_format( currency($cart->offer_price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false) )}}
  • {{ activeCurrency()->symbol }}{{ price_format( currency($cart->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}
  • @else
  • {{ activeCurrency()->symbol }}{{ price_format( currency($cart->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}
  • @endif
@if($cart->disamount == !NULL) @if(Session::has('coupanapplied'))
@endif @endif
@endforeach @endauth @guest @foreach($carts as $c) @php $cart = App\Course::where('id', $c)->where('status', '1')->first(); @endphp
@if($cart->preview_image !== NULL && $cart->preview_image !== '') blog @else blog @endif
{{ csrf_field() }}
    @if($cart->discount_price == !NULL)
  • {{ currency($cart->discount_price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = true) }}
  • {{ currency($cart->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = true) }}
  • @else
  • {{ currency($cart->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = true) }}
  • @endif
@if($cart->disamount == !NULL) @if(Session::has('coupanapplied'))
@endif @endif
@endforeach @endguest
@if(count($item)>0)
@php if(auth::check()) { $cartitems = App\Cart::where('user_id', Auth::User()->id)->first(); } else { $cartitems = session()->get('cart.add_to_cart'); } @endphp @if ($cartitems == NULL) {{ __('frontstaticword.empty') }} @else

{{ __('frontstaticword.Total') }}:

  • {{ __('frontstaticword.TotalPrice') }}{{ activeCurrency()->symbol }}{{ price_format( currency($price_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}
  • {{ __('frontstaticword.OfferDiscount') }} {{ activeCurrency()->symbol }}{{ price_format( currency($price_total - $offer_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}
  • {{ __('frontstaticword.CouponDiscount') }} @if( $cpn_discount == !NULL) - {{ currency($cpn_discount, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = true) }} @else {{ __('frontstaticword.ApplyCoupon') }} @endif
  • {{ __('frontstaticword.DiscountPercent') }}{{ round($offer_percent, 0) }}% {{ __('frontstaticword.off') }}

  • {{ __('frontstaticword.Total') }}:{{ activeCurrency()->symbol }}{{ price_format( currency($cart_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}
@if(round($cart_total) == 0) {{ __('frontstaticword.EnrollNow') }} @else @if(auth::check())
@csrf @php session()->put('price_total',$price_total); session()->put('offer_total',$offer_total); session()->put('offer_percent',$offer_percent); session()->put('cart_total',$cart_total); @endphp
@else {{ __('frontstaticword.Checkout') }} @endif @endif
@endif

@auth
{{ csrf_field() }}
@endauth @if(Session::has('fail'))
{{ Session::get('fail') }}
@endif @if(Session::has('coupanapplied'))
{{ csrf_field() }}
{{Session::get('coupanapplied')['msg']}}
@endif @endif
@else
{{ __('frontstaticword.cartempty') }}
@endif
@auth @endauth
@endsection