@php $isFree = ($item->pricing_type ?? null) === 'free'; $hasDiscount = !empty($item->discount); @endphp
{{ $item->title }}

{{ $item->title }}

{{ $item->short_description }}

@unless ($isFree)
Course Price @if ($hasDiscount) {{ $currency }} {{ $item->price }} @else {{ $currency }} {{ $item->price }} @endif
@if ($hasDiscount)
Discounted Price {{ $currency }} {{ $item->discount_price }}
@endif @if ($coupon)
Coupon Discount ({{ strtoupper($coupon->code) }}) -{{ $currency }} {{ $couponDiscount }}
@endif
Total Payment {{ $currency }} {{ $discountedPrice }}
@else

Free Course

Enjoy the course for free!

@endunless @unless ($isFree)

Apply Coupon

@if ($coupon)

Coupon Applied

{{ $coupon->code }}

Remove
@else
{{-- Display Available Coupons --}} @if (isset($itemCoupons) && !empty($itemCoupons) && count($itemCoupons) > 0)

Available Coupons for this {{ ucfirst($item_type) }}

@foreach ($itemCoupons as $availableCoupon)
{{ $availableCoupon->code }} @if ($availableCoupon->discount_type === 'percentage') {{ $availableCoupon->discount }}% OFF @else {{ $currency }} {{ number_format($availableCoupon->discount, 2) }} OFF @endif
@if ($availableCoupon->valid_to)

Valid until {{ \Carbon\Carbon::parse($availableCoupon->valid_to)->format('M d, Y') }}

@endif
@endforeach
@endif @endif
@endunless