@extends('layouts.site') @section('title', __('frontend.checkout') . ' • ' . $course->title) @section('content') @php $onlinePrice = $course->online_discount_price ?: $course->online_old_price; $offlinePrice = $course->offline_discount_price ?: $course->offline_old_price; $availableBatchTypes = $availableBatchTypes ?? []; $selectedBatchType = old('batch_type', $availableBatchTypes[0] ?? ''); @endphp

{{ $course->title }}

{{ __('frontend.checkout_note') }}

@csrf @if(count($availableBatchTypes) > 1)
@if(in_array('online', $availableBatchTypes, true)) @endif @if(in_array('offline', $availableBatchTypes, true)) @endif
@error('batch_type')

{{ $message }}

@enderror
@elseif(count($availableBatchTypes) === 1)
Admission type
{{ ucfirst($availableBatchTypes[0]) }} Only available option
@endif @if($course->relationLoaded('batches') && $course->batches->count())
@error('batch_id')

{{ $message }}

@enderror
@else
{{ __('frontend.no_batch_available_body') }}
@endif
@endsection