@php $oldSessionAddressId = null; $billingAddressSameAsShippingAddress = old('billing_address_same_as_shipping_address', Arr::get($sessionCheckoutData, 'billing_address_same_as_shipping_address', true)); @endphp
@if ($isShowAddressForm)
{{ __('Same as shipping information') }}
@elseif (auth('customer')->check() && $isAvailableAddress)
@php $oldSessionAddressId = old('address.address_id', $sessionAddressId) @endphp
{{ __('Select billing address...') }}
@foreach ($addresses as $address)
id)>{{ $address->full_address }}
@endforeach
@endif
{{ __('Full Name') }}
{!! Form::error('billing_address.name', $errors) !!}
{{ __('Email') }}
{!! Form::error('billing_address.email', $errors) !!}
{!! Form::text('billing_address[phone]', old('billing_address.phone', Arr::get($sessionCheckoutData, 'billing_address.phone')) ?: (auth('customer')->check() ? auth('customer')->user()->phone : null), ['id' => 'billing-address-phone', 'class' => 'form-control']) !!}
{{ __('Phone') }}
{!! Form::error('billing_address.phone', $errors) !!}
@if (EcommerceHelper::isUsingInMultipleCountries())
@foreach(EcommerceHelper::getAvailableCountries() as $countryCode => $countryName)
{{ $countryName }}
@endforeach
{{ __('Country') }}
@else
@endif {!! Form::error('billing_address.country', $errors) !!}
@if (EcommerceHelper::loadCountriesStatesCitiesFromPluginLocation())
{{ __('Select state...') }}
@if (old('billing_address.country', Arr::get($sessionCheckoutData, 'billing_address.country')) || !EcommerceHelper::isUsingInMultipleCountries()) @foreach(EcommerceHelper::getAvailableStatesByCountry(old('billing_address.country', Arr::get($sessionCheckoutData, 'billing_address.country'))) as $stateId => $stateName)
{{ $stateName }}
@endforeach @endif
{{ __('State') }}
@else
{{ __('State') }}
@endif {!! Form::error('billing_address.state', $errors) !!}
@if (EcommerceHelper::loadCountriesStatesCitiesFromPluginLocation())
{{ __('Select city...') }}
@if (old('billing_address.state', Arr::get($sessionCheckoutData, 'billing_address.state'))) @foreach(EcommerceHelper::getAvailableCitiesByState(old('billing_address.state', Arr::get($sessionCheckoutData, 'billing_address.state'))) as $cityId => $cityName)
{{ $cityName }}
@endforeach @endif
{{ __('City') }}
@else
{{ __('City') }}
@endif {!! Form::error('billing_address.city', $errors) !!}
{{ __('Address') }}
{!! Form::error('billing_address.address', $errors) !!}
@if (EcommerceHelper::isZipCodeEnabled())
{{ __('Zip code') }}
{!! Form::error('billing_address.zip_code', $errors) !!}
@endif