@extends('layouts/front') @section('title', __('store.checkout.title')) @section('scripts') @endsection @section('content')
@if (theme_metadata('enable_pagetitle', 'false') == 'false')

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

@endif @include("shared.alerts")
@if (Auth::check())
{{ __('auth.signed_in_as') }} {{ Auth::user()->FullName }} ({{ Auth::user()->email }})
@if (Auth::check() && !Auth::user()->hasVerifiedEmail() && setting('checkout.customermustbeconfirmed', false)) @endif @else @endif @if (Auth::check())
@csrf
@include("shared.input", ["name" => "firstname", "label" => __('global.firstname'), "value" => auth('web')->user()->firstname ?? old("firstname")])
@include("shared.input", ["name" => "lastname", "label" => __('global.lastname'), "value" => auth('web')->user()->lastname ?? old("lastname")])
@include("shared.input", ["name" => "company_name", "label" => __('global.company_name'), "value" => auth('web')->user()->company_name ?? old("company_name")])
@include("shared.input", ["name" => "address", "label" => __('global.address'), "value" => auth('web')->user()->address ?? old("address")])
@include("shared.input", ["name" => "address2", "label" => __('global.address2'), "value" => auth('web')->user()->address2 ?? old("address2")])
@include("shared.input", ["name" => "zipcode", "label" => __('global.zip'), "value" => auth('web')->user()->zipcode ?? old("zipcode")])
@include("shared.input", ["name" => "email", "label" => __('global.email'), "type" => "email", "value" => auth('web')->user()->email ?? old("email"), "disabled"=> true])
@include("shared.input", ["name" => "phone", "label" => __('global.phone'), "value" => auth('web')->user()->phone ?? old("phone")])
@include("shared.select", ["name" => "country", "label" => __('global.country'), "options" => $countries,"value" => auth('web')->user()->country ?? old("country")])
@include("shared.input", ["name" => "city", "label" => __('global.city'), "value" => auth('web')->user()->city ?? old("city")])
@include("shared.input", ["name" => "region", "label" => __('global.region'), "value" => auth('web')->user()->region ?? old("region")])
@include("shared/textarea", ["name" => "billing_details", "label" => __('global.billing_details'), "value" => auth('web')->user()->billing_details ?? old("billing_details"), "help" => __('global.billing_details_help')])
@if (setting('checkout.toslink'))
@endif @include('shared/captcha', ['center' => false]) @if ($basket->total() != 0)

{{ __('store.checkout.choose_payment') }}

@if (auth('web')->user()->paymentMethods()->isNotEmpty())

{{ __('store.checkout.choose_payment_method') }}

{{ __('store.checkout.choose_payment_method_description') }}

@include('shared/select', [ 'name' => 'paymentmethod', 'options' => auth('web')->user()->getPaymentMethodsArray()->merge(['none' => __('store.checkout.not_use_payment_method')]), 'value' => 'none' ])
@endif
@foreach ($gateways as $gateway) @endforeach
@endif @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
{{ __('store.config.recurring_payment') }} {{ formatted_price($basket->recurringPayment(), $basket->currency()) }}
{{ __('store.fees') }} {{ formatted_price($basket->setup(), $basket->currency()) }}
@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
{{ $basket->coupon ? __('coupon.subtotal_without_coupon') : __('store.subtotal') }} {{ formatted_price($basket->subtotalWithoutCoupon(), $basket->currency()) }}
{{ __('store.vat') }} {{ formatted_price($basket->tax(), $basket->currency()) }}

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

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