@extends('layouts/front') @section('title', __('store.basket.title')) @section('scripts') @endsection @section('content')
@include("shared.alerts") @if (theme_metadata('enable_pagetitle', 'false') == 'false')

{{ __('store.basket.title') }}

@endif
@if ($basket->items()->count() == 0) @endif @foreach($basket->items()->get() as $row) @php($pricing = $row->product->getPriceByCurrency($row->currency, $row->billing)) @endforeach
{{ __('global.product') }} {{ __('store.price') }} {{ __('store.qty') }} {{ __('store.total') }}
@include("shared.icons.shopping-cart")

{{ __('store.basket.empty') }}

{{ __('store.basket.continue') }}
@csrf @method('DELETE')
@include('shared/icons/edit') {{ $row->product->trans('name') }} @if ($row->primary() != null) {{ $row->primary() }} @endif
@if (!empty($row->optionsFormattedName())) @foreach ($row->optionsFormattedName(false) as $name) {{ $name }}
@endforeach
@endif
{{ formatted_price($pricing->firstPayment(),$pricing->currency) }} @if ($row->canChangeQuantity())
@csrf {{ $row->quantity }}
@else {{ $row->quantity }} @endif
{{ formatted_price($row->total(), $row->currency) }}

{{ __('coupon.add_coupon_title') }}

@csrf
@include('shared/input', ['name' => 'coupon', 'attributes' => ['placeholder' => __('coupon.coupon_placeholder')], 'value' => old('coupon', $basket->coupon ? $basket->coupon->code : null)])
@if ($basket->coupon) @method('DELETE') @endif
@if ($basket->coupon) @else @endif

{{ __('store.config.summary') }}

@foreach($basket->items as $row) @php($pricing = $row->product->getPriceByCurrency($row->currency, $row->billing))
{{ $row->product->trans('name') }} {{ formatted_price($row->subtotalWithoutCoupon(), $row->currency) }}
@if (!empty($row->getOptions()))
@foreach ($row->getOptions() as $option)
{{ $option->formattedName() }} {{ formatted_price($option->subtotal($row->currency, $row->billing), $row->currency) }}
@endforeach @endif @endforeach @if ($basket->coupon)
{{ __('coupon.coupon') }} {{ $basket->coupon->code }}
@endif

@if ($basket->coupon)
@if ($basket->discount(\App\Models\Store\Basket\BasketRow::PRICE))
{{ __('coupon.discount_price') }} -{{ formatted_price($basket->discount(\App\Models\Store\Basket\BasketRow::PRICE), $basket->currency()) }}
@endif @if ($basket->coupon->free_setup == 0 && $basket->discount(\App\Models\Store\Basket\BasketRow::SETUP_FEES) > 0)
{{ __('coupon.discount_setup') }} -{{ formatted_price($basket->discount(\App\Models\Store\Basket\BasketRow::SETUP_FEES), $basket->currency()) }}
@endif @if ($basket->coupon->free_setup == 1 && $basket->discount(\App\Models\Store\Basket\BasketRow::SETUP_FEES) > 0)
{{ __('coupon.free_setup') }} -{{ formatted_price($basket->discount(\App\Models\Store\Basket\BasketRow::SETUP_FEES), $basket->currency()) }}
@endif

{{ __('coupon.subtotal_with_coupon') }} {{ formatted_price($basket->subtotal(), $basket->currency()) }}
@endif
{{ __('store.config.recurring_payment') }} {{ formatted_price($basket->recurringPayment(), $basket->currency()) }}
{{ __('store.config.onetime_payment') }} {{ formatted_price($basket->onetimePayment(), $basket->currency()) }}
{{ __('store.fees') }} {{ formatted_price($basket->setup(), $basket->currency()) }}
{{ __('store.vat') }} {{ formatted_price($basket->tax(), $basket->currency()) }}
{{ $basket->coupon ? __('coupon.subtotal_without_coupon') : __('store.subtotal') }} {{ formatted_price($basket->subtotalWithoutCoupon(), $basket->currency()) }}

{{ __('store.basket.paytoday') }} {{ formatted_price($basket->total(), $basket->currency()) }}
{{ __('store.basket.finish') }}
{!! render_theme_sections() !!} @endsection