@php use App\Enumerables\Currency; use App\Order; use App\ProductModel; $currency = Currency::GBP; $currencySign = '£ '; /** * @var Order $order * @var ProductModel $productModel */ if (isset($_COOKIE['currency']) && (int) $_COOKIE['currency'] != Currency::GBP) { $currency = Currency::CNY; $currencySign = '¥ '; } $currentMonth = date('m'); $currentYear = date('Y'); $maxYear = $currentYear + 2; $language = config('app.locale'); $checked = ($checked ?? false) ? 'checked' : ''; $discountPercentage = $discount['percentage'] ?? 0; $isCheckout = $isCheckout ?? false; @endphp @foreach($items as $item) @php /** * @var \App\ProductModel|\App\Course|\App\VirtualCourse|\Modules\Translation\Entities\TranslationService $productModel * @var array $item */ $productModel = \App\Cart::getProductModel($item['product_type'], $item['product_id']); $itemImage = $productModel->productImage($language); $title = $productModel->title($language); if ($item['product_type'] == \App\Enumerables\OrderItemTypes::TRANSLATION) { $subtitle = $productModel->subtitle( $language, null, new \Modules\Translation\Entities\TranslationDetails([ 'language' => $item['translation_language'], 'urgency' => $item['translation_urgency'], 'count' => $item['translation_count'], ]) ); } else { $subtitle = $productModel->subtitle($language); } $totalItemDiscount = ($item['discountEvent'] ?? 0) + ($item['discountValue'] ?? 0); @endphp
@if($item['product_type'] != \App\Enumerables\OrderItemTypes::VIRTUAL_COURSE)
{{__('deposit-refund-note')}}
@endif
@elseif($item['product_type'] != \App\Enumerables\OrderItemTypes::TRANSLATION)
@endif
{{$currencySign.number_format($item['totalFees'], 2, ".", ",")}}
@if($totalItemDiscount > 0)
{{$currencySign.number_format($item['totalFees'] - $totalItemDiscount, 2, ".", ",")}}
@endif
@if($discountPercentage)
@include('order.components.max_discount', [
'item' => $productModel,
'lang' => $language,
'discountPercentage' => $discountPercentage
])
@endif