@extends('layouts.default') @push('title', get_phrase('Cart')) @push('meta')@endpush @push('css')@endpush @section('content')

{{ get_phrase('Shopping cart') }}

{{ get_phrase('Cart items') }}

@php $count_items_price = 0; @endphp @if (count($cart_items) > 0)
@foreach ($cart_items as $course)
course-thumbnail

{{ ucfirst($course->title) }}

{!! ellipsis(strip_tags($course->description), 200) !!}

@if ($course->is_paid == 0) {{ get_phrase('Free') }} @else @if ($course->discount_flag == 1) @php $count_items_price += $course->discounted_price; @endphp @php $discounted_price = number_format(($course->discounted_price), 2) @endphp {{ currency($discounted_price) }} {{ currency($course->price, 2) }} @else @php $count_items_price += $course->price; @endphp {{ currency($course->price, 2) }} @endif @endif

@endforeach
@else @include('frontend.default.empty') @endif

{{ get_phrase('Payment summary') }}

{{ get_phrase('Sub total') }} {{ currency($count_items_price, 2) }}

@php $coupon_discount = $count_items_price * ($discount / 100); $tax = (get_settings('course_selling_tax') / 100) * ($count_items_price - $coupon_discount); @endphp @if ($discount)

{{ get_phrase('Discount') }} ({{ $discount }}{{ get_phrase('%') }}) - {{ currency($coupon_discount, 2) }}

@endif

{{ get_phrase('Tax') }} ({{ get_settings('course_selling_tax') }}{{ get_phrase('%') }}) + {{ currency($tax, 2) }}

{{ get_phrase('Total') }} @php $payable = $count_items_price - ($coupon_discount) + $tax; @endphp {{ currency($payable, 2) }}

@csrf
@if (request()->has('coupon') && isset($coupon) && $coupon_discount > 0)
{{ get_phrase('Coupon') }} {{ get_phrase('Applyed') }} ({{ $coupon->discount }}%) !
@endif
@endsection @push('js') @endpush