@if (EcommerceHelper::isEnabledGuestCheckout() && !auth('customer')->check())

{{ __('Already have an account?') }} {{ __('Login') }}

@endif {!! apply_filters('ecommerce_checkout_address_form_before') !!} @auth('customer')
@if ($isAvailableAddress) @endif @php $oldSessionAddressId = old('address.address_id', $sessionAddressId); @endphp

@if ($isAvailableAddress && $oldSessionAddressId != 'new') @if ($oldSessionAddressId && $addresses->contains('id', $oldSessionAddressId)) @include('plugins/ecommerce::orders.partials.address-item', [ 'address' => $addresses->firstWhere('id', $oldSessionAddressId), ]) @elseif ($defaultAddress = get_default_customer_address()) @include('plugins/ecommerce::orders.partials.address-item', [ 'address' => $defaultAddress, ]) @else @include('plugins/ecommerce::orders.partials.address-item', [ 'address' => Arr::first($addresses), ]) @endif @endif
@if ($isAvailableAddress) @foreach ($addresses as $address)
@include( 'plugins/ecommerce::orders.partials.address-item', compact('address'))
@endforeach @endif
@endauth
{!! Form::error('address.name', $errors) !!}
@if (!in_array('email', EcommerceHelper::getHiddenFieldsAtCheckout()))
!in_array( 'phone', EcommerceHelper::getHiddenFieldsAtCheckout()), ])>
{!! Form::error('address.email', $errors) !!}
@endif @if (!in_array('phone', EcommerceHelper::getHiddenFieldsAtCheckout()))
!in_array( 'email', EcommerceHelper::getHiddenFieldsAtCheckout()), ])>
{!! Form::error('address.phone', $errors) !!}
@endif
{!! apply_filters('ecommerce_checkout_address_form_inside', null) !!} @if (EcommerceHelper::isUsingInMultipleCountries() && !in_array('country', EcommerceHelper::getHiddenFieldsAtCheckout()))
{!! Form::error('address.country', $errors) !!}
@else @endif
@if (!in_array('state', EcommerceHelper::getHiddenFieldsAtCheckout()))
@if (EcommerceHelper::loadCountriesStatesCitiesFromPluginLocation())
@else
@endif {!! Form::error('address.state', $errors) !!}
@endif @if (!in_array('city', EcommerceHelper::getHiddenFieldsAtCheckout()))
! in_array('state', EcommerceHelper::getHiddenFieldsAtCheckout()), 'col-12' => in_array('state', EcommerceHelper::getHiddenFieldsAtCheckout())])>
@if (EcommerceHelper::useCityFieldAsTextField())
@else
@endif {!! Form::error('address.city', $errors) !!}
@endif
@if (!in_array('address', EcommerceHelper::getHiddenFieldsAtCheckout()))
{!! Form::error('address.address', $errors) !!}
@endif @if (EcommerceHelper::isZipCodeEnabled())
{!! Form::error('address.zip_code', $errors) !!}
@endif
@if (!auth('customer')->check())
{!! Form::error('password', $errors) !!}
{!! Form::error('password_confirmation', $errors) !!}
@endif {!! apply_filters('ecommerce_checkout_address_form_after', null, $sessionCheckoutData) !!}