@extends('theme.master') @section('title', 'Cart') @section('content') @include('admin.message') @php $gets = App\Breadcum::first(); @endphp @if(isset($gets))
@if($gets['img'] !== NULL && $gets['img'] !== '') @else course @endif

{{ __('Shopping Cart') }}

@endif

@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 {{ __('Courses in Cart') }}

@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()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($cart->offer_price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false) )}}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($cart->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • @else
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($cart->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • @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) {{ __('empty') }} @else

{{ __('Total') }}:

  • {{ __('Total Price') }}{{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }} {{ price_format( currency($price_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • {{ __('Offer Discount') }} {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }} {{ price_format( currency($price_total - $offer_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • {{ __('Coupon Discount') }} @if( $cpn_discount == !NULL) - {{ currency($cpn_discount, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = true) }} @else {{ __('ApplyCoupon') }} @endif
  • {{ __('Discount Percent') }}{{ round($offer_percent, 0) }}% {{ __('off') }}

  • {{ __('Total') }}:{{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }} {{ price_format( currency($cart_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
@if(round($cart_total) == 0) {{ __('Enroll Now') }} @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 {{ __('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
{{ __('cart empty') }}
@endif
@auth @endauth
@endsection