<{* Template: address.html Description: This template handles the first step of the checkout. Author: 1260 A/S, @1260-digital Since: 2022-09-01 *}> <{assign var="shipping_methods" value=$webshop->getShippings()}> <{assign var="payment_methods" value=$webshop->getPaymentGateways()}> <{assign var="skip_approve" value=$webshop->getSkipApprove()}> <{capture name="title_basket_value"}> <{$price|number_format:2:$smarty.capture.decimal:$smarty.capture.thousand}> <{$currency}> <{/capture}> <{capture name="title"}> <{if $shipping_methods|@count == 1 && $payment_methods|@count == 1 && $skip_approve}> <{t section="Address" x=$total_amount y=$smarty.capture.title_basket_value s=$webshop->getName()}>You have {x} item(s) in your basket at a total of {y} - {s}<{/t}> <{elseif $shipping_methods|@count == 1 && $payment_methods|@count == 1}> <{t section="Address" x=$total_amount y=$smarty.capture.title_basket_value s=$webshop->getName()}>Step 1 of 2 - You have {x} item(s) in your basket at a total of {y} - {s}<{/t}> <{else}> <{t section="Address" x=$total_amount y=$smarty.capture.title_basket_value s=$webshop->getName()}>Step 1 of 3 - You have {x} item(s) in your basket at a total of {y} - {s}<{/t}> <{/if}> <{/capture}> <{include file="partials/checkout.start.html"}> <{if $get.missing}> <{include file="components/alert.html" variant="error" icon="x" text="Missing one or more fields"|t}> <{/if}> <{if $get.exists}> <{include file="components/alert.html" variant="error" icon="x" text="A profile with that email already exists"|t}> <{/if}> <{if $get.missing_address}> <{include file="components/alert.html" variant="error" icon="x" text="An address is missing"|t}> <{/if}> <{if $webshop->hasInvoiceAddressSelection() && $settings.checkout.enable_quick_checkout}>
<{t}>Express checkout<{/t}>
<{/if}> <{assign var="countries" value=$webshop->getCountries()}> <{section name="i" loop=$countries}> <{if ! $defaultCountryId || $countries[i]->getIsDefault()}> <{assign var="defaultCountryId" value=$countries[i]->getCountryId()}> <{/if}> <{if $countries[i]->getCode() === 'DK'}> <{assign var="countryIdForDK" value=$countries[i]->getCountryId()}> <{/if}> <{/section}> <{if ($settings.checkout_address.enable_b2b && $settings.checkout_address.enable_b2c || $settings.checkout_address.enable_b2b && $settings.checkout_address.enable_b2g || $settings.checkout_address.enable_b2c && $settings.checkout_address.enable_b2g) }> <{assign var="multiple_order_types" value=true}> <{else}> <{assign var="multiple_order_types" value=false}> <{/if}>
<{t}>Contact details<{/t}>
<{if $settings.checkout.enable_newsletter_subscription}> <{/if}>
<{if $multiple_order_types }>
<{t}>How are you ordering?<{/t}>
<{if $settings.checkout_address.enable_b2c }>
<{include file="components/input.html" name="extra[customer_type]" type="radio" xmodel="order_type" xvalue="'type_private'" xref="order_type" id="type_private" }> <{include file="components/label.html" for="type_private" text="Private"|t }>
<{/if}> <{if $settings.checkout_address.enable_b2b }>
<{include file="components/input.html" name="extra[customer_type]" type="radio" xmodel="order_type" xvalue="'type_company'" id="type_company" }> <{include file="components/label.html" for="type_company" text="Company"|t }>
<{/if}> <{if $settings.checkout_address.enable_b2g }>
<{include file="components/input.html" name="extra[customer_type]" type="radio" xmodel="order_type" xvalue="'type_ean'" id="type_ean" }> <{include file="components/label.html" for="type_ean" text="Public"|t }>
<{/if}>
<{/if}>
<{t}>Delivery Address<{/t}> <{t}>Order Address<{/t}>
<{include file="components/label.html" for="order_name" text="Name"|t required="true" xclass="{'label--is-floating': order_name && order_name.length > 0 }" }> <{include file="components/input.html" name="order_name" type="text" placeholder="Name"|t inputmode="text" autocomplete="name" required="true" xclass="{'input--has-value': order_name && order_name.length > 0 }" xmodel="order_name" xvalue="order_name" xref="order_name" }>
<{if $settings.checkout_address.enable_b2b || $settings.checkout_address.enable_b2g }>
x-show="order_type === 'type_company' || order_type === 'type_ean'" <{/if}> > <{include file="components/label.html" for="order_company_name" text="Company name"|t xclass="{'label--is-floating': order_company_name && order_company_name.length > 0 }" required=$multiple_order_types }> <{include file="components/input.html" name="order_company_name" type="text" placeholder="Company name"|t inputmode="text" autocomplete="organization" xclass="{'input--has-value': order_company_name && order_company_name.length > 0 }" xmodel="order_company_name" xvalue="order_company_name" xref="order_company_name" xrequired="order_type === 'type_company' || order_type === 'type_ean'" }>
x-show="order_type === 'type_company' || order_type === 'type_ean'" x-cloak<{/if}> > <{include file="components/label.html" for="vat_number" text="VAT Number"|t xclass="{'label--is-floating': vat_number && vat_number.length > 0 }" required=true }> <{include file="components/input.html" name="vat_number" type="text" placeholder="VAT Number"|t inputmode="text" autocomplete="off" xclass="{'input--has-value': vat_number && vat_number.length > 0 }" xmodel="vat_number" xvalue="vat_number" xref="vat_number" xrequired="order_type === 'type_company'" }>
<{/if}> <{if $settings.checkout_address.enable_b2g}>
x-show="order_type === 'type_ean'" x-cloak<{/if}> > <{include file="components/label.html" for="ean_number" text="EAN Number"|t xclass="{'label--is-floating': ean_number && ean_number.length > 0 }" required=true }> <{include file="components/input.html" name="ean_number" type="text" placeholder="EAN Number"|t inputmode="text" autocomplete="off" xclass="{'input--has-value': ean_number && ean_number.length > 0 }" xmodel="ean_number" xvalue="ean_number" xref="ean_number" xrequired="order_type === 'type_ean'" }>
x-show="order_type === 'type_ean'" x-cloak<{/if}> > <{include file="components/label.html" for="ean_reference" text="Reference"|t xclass="{'label--is-floating': ean_reference && ean_reference.length > 0 }" }> <{include file="components/input.html" name="extra[ean_reference]" type="text" placeholder="Reference"|t inputmode="text" autocomplete="off" xclass="{'input--has-value': ean_reference && ean_reference.length > 0 }" xmodel="ean_reference" xvalue="ean_reference" xref="ean_reference" }>
x-show="order_type === 'type_ean'" x-cloak<{/if}> > <{include file="components/label.html" for="ean_reference_number" text="Reference Number"|t xclass="{'label--is-floating': ean_reference_number && ean_reference_number.length > 0 }" }> <{include file="components/input.html" name="extra[ean_reference_number]" type="text" placeholder="Reference Number"|t inputmode="text" autocomplete="off" xclass="{'input--has-value': ean_reference_number && ean_reference_number.length > 0 }" xmodel="ean_reference_number" xvalue="ean_reference_number" xref="ean_reference_number" }>
<{/if}>
<{include file="components/label.html" for="order_address" text="Address"|t required="true" xclass="{'label--is-floating': order_address && order_address.length > 0 }" }> <{include file="components/input.html" name="order_address" type="text" placeholder="Address"|t inputmode="text" autocomplete="street-address" required="true" xclass="{'input--has-value': order_address && order_address.length > 0 }" xmodel="order_address" xvalue="order_address" xref="order_address" }>
<{if $countries|@count> 1}> <{include file="components/label.html" for="order_country_id" text="Country"|t required="true" class="label--is-floating" }> <{capture name='order_country_id_options'}> <{section name="i" loop=$countries}> <{/section}> <{/capture}> <{include file="components/select.html" name="order_country_id" autocomplete="country-name" required="true" options=$smarty.capture.order_country_id_options class="form-select--has-value" xmodel="order_country_id" xvalue="order_country_id" xref="order_country_id" }> <{else}> <{include file="components/label.html" for="order_country" text="Country"|t class="label--is-floating" }> <{include file="components/input.html" name="order_country" type="text" tabindex="-1" inputmode="text" required="true" class="input--has-value input--readonly" value=$countries[0]->getName() }> <{/if}>
<{include file="components/label.html" for="order_zipcode" text="Zipcode"|t required="true" xclass="{'label--is-floating': order_zipcode && order_zipcode.length > 0 }" }> <{include file="components/input.html" name="order_zipcode" type="text" placeholder="Zipcode"|t inputmode="text" autocomplete="postal-code" required="true" xclass="{'input--has-value': order_zipcode && order_zipcode.length > 0 }" xmodel="order_zipcode" xvalue="order_zipcode" xref="order_zipcode" }>
<{include file="components/label.html" for="order_city" text="City"|t required="true" xclass="{'label--is-floating': order_city && order_city.length > 0 }" }> <{include file="components/input.html" name="order_city" type="text" inputmode="text" placeholder="City"|t autocomplete="address-level2" required="true" xclass="{'input--has-value': order_city && order_city.length > 0 }" xmodel="order_city" xvalue="order_city" xref="order_city" }>
<{include file="components/label.html" for="phone" text="Phone"|t required="true" xclass="{'label--is-floating': phone && phone.length > 0 }" }> <{include file="components/input.html" name="phone" type="tel" placeholder="Phone"|t inputmode="tel" autocomplete="tel" required="true" xclass="{'input--has-value': phone && phone.length > 0 }" xmodel="phone" xvalue="phone" xref="phone" }>
<{if $settings.checkout_address.enable_comments}>
<{include file="components/label.html" for="show_order_comments" text="I have a comment for my order"|t }> <{include file="components/input.html" name="show_order_comments" type="checkbox" xmodel="show_order_comments" xvalue="show_order_comments" xref="show_order_comments" xchecked="show_order_comments" }>
<{include file="components/label.html" for="comments" text="Comments"|t required="true" xclass="{'label--is-floating': comments && comments.length > 0 }" }> <{include file="components/textarea.html" name="comments" type="text" xrequired="show_order_comments" placeholder="Comments"|t xclass="{'input--has-value': comments && comments.length > 0 }" xmodel="comments" xvalue="comments" xref="comments" }>
<{/if}> <{if $settings.checkout_address.enable_create_profile && !$customer}>
<{if $webshop->hasLoyaltyProgram() && $webshop->getLoyaltyProgramSignupPoints()}> <{capture name="loyality_checkbox_label"}> <{t x=$webshop->getLoyaltyProgramSignupPoints()|number_format:0:",":"."}>Create a free account and earn {x} points<{/t}> <{/capture}> <{include file="components/label.html" for="create_profile" text=$smarty.capture.loyality_checkbox_label }> <{else}> <{include file="components/label.html" for="create_profile" text="Create account for a quicker checkout in the future"|t }> <{/if}> <{include file="components/input.html" name="create_profile" type="checkbox" xmodel="create_profile" xvalue="create_profile" xref="create_profile" xchecked="create_profile" value="1" }>
<{/if}>
<{include file="components/label.html" for="show_del_address" text="Deliver my order to another address"|t }> <{include file="components/input.html" name="show_del_address" type="checkbox" xmodel="show_del_address" xvalue="show_del_address" xref="show_del_address" xchecked="show_del_address" }>
<{t}>Delivery Address<{/t}>
<{include file="components/label.html" for="del_name" text="Recipient Name"|t required="true" xclass="{'label--is-floating': del_name && del_name.length > 0 }" }> <{include file="components/input.html" name="del_name" type="text" placeholder="Recipient Name"|t inputmode="text" autocomplete="off" xrequired="show_del_address" xclass="{'input--has-value': del_name && del_name.length > 0 }" xmodel="del_name" xvalue="del_name" xref="del_name" }>
<{include file="components/label.html" for="del_company_name" text="Company Name"|t xclass="{'label--is-floating': del_company_name && del_company_name.length > 0 }" }> <{include file="components/input.html" name="del_company_name" type="text" placeholder="Company Name"|t inputmode="text" autocomplete="off" xclass="{'input--has-value': del_company_name && del_company_name.length > 0 }" xmodel="del_company_name" xvalue="del_company_name" xref="del_company_name" }>
<{include file="components/label.html" for="del_address" text="Address"|t required="true" xclass="{'label--is-floating': del_address && del_address.length > 0 }" }> <{include file="components/input.html" name="del_address" type="text" placeholder="Address"|t inputmode="text" autocomplete="off" xrequired="show_del_address" xclass="{'input--has-value': del_address && del_address.length > 0 }" xmodel="del_address" xvalue="del_address" xref="del_address" }>
<{include file="components/label.html" for="del_zipcode" text="Zipcode"|t required="true" xclass="{'label--is-floating': del_zipcode && del_zipcode.length > 0 }" }> <{include file="components/input.html" name="del_zipcode" type="text" placeholder="Zipcode"|t inputmode="text" autocomplete="off" xrequired="show_del_address" xclass="{'input--has-value': del_zipcode && del_zipcode.length > 0 }" xmodel="del_zipcode" xvalue="del_zipcode" xref="del_zipcode" }>
<{include file="components/label.html" for="del_city" text="City"|t required="true" xclass="{'label--is-floating': del_city && del_city.length > 0 }" }> <{include file="components/input.html" name="del_city" type="text" placeholder="City"|t inputmode="text" autocomplete="off" xrequired="show_del_address" xclass="{'input--has-value': del_city && del_city.length > 0 }" xmodel="del_city" xvalue="del_city" xref="del_city" }>
<{if $countries|@count> 1}> <{include file="components/label.html" for="del_country_id" text="Country"|t class="label--is-floating" }> <{capture name='acountry_options'}> <{section name="i" loop=$countries}> <{/section}> <{/capture}> <{include file="components/select.html" name="del_country_id" autocomplete="country-name" options=$smarty.capture.acountry_options class="form-select--has-value" xmodel="del_country_id" xrequired="show_del_address" xvalue="del_country_id" xref="del_country_id" }> <{else}> <{include file="components/label.html" for="del_country_id" text="Country"|t class="label--is-floating" }> <{include file="components/input.html" name="del_country_id" type="text" readonly="true" inputmode="text" xrequired="show_del_address" class="input--has-value input--readonly" value=$countries[0]->getName() }> <{/if}>
<{if $shipping_methods|@count == 1 && $payment_methods|@count == 1}> <{include file="partials/checkout.shipping.methods.html" }> <{include file="partials/checkout.payment.methods.html"}> <{if $skip_approve}> <{include file="partials/checkout.terms.html" title="Terms & Conditions"|t}> <{/if}> <{/if}>
<{include file="components/button.html" class="btn--checkout btn--checkout-previous" size="lg" text="Back to cart"|t type="link" variant="default" href="/basket"}> <{if $shipping_methods|@count == 1 && $payment_methods|@count == 1 && $skip_approve}> <{include file="components/button.html" class="btn--checkout btn--checkout-next" size="lg" text="Pay order now"|t type="submit" variant="action" xloader="loading"}> <{elseif $shipping_methods|@count == 1 && $payment_methods|@count == 1}> <{include file="components/button.html" class="btn--checkout btn--checkout-next" size="lg" text="Review order"|t type="submit" variant="action" xloader="loading"}> <{else}> <{include file="components/button.html" class="btn--checkout btn--checkout-next" size="lg" text="Continue to delivery"|t type="submit" variant="action" xloader="loading"}> <{/if}>
<{include file="partials/checkout.end.html"}>