<{* Template: user-edit.html Description: Lets logged-in users edit their information Author: Mikkel Tschentscher Author Mail: hello@mikkeltschentscher.dk Author URL: https://mikkeltschentscher.dk *}> <{capture name="title"}> <{t section="User"}>Edit profile<{/t}> <{/capture}> <{capture name="noindex"}> noindex <{/capture}> <{assign var="countries" value=$webshop->getCountries()}> <{include file="partials/user.profile.wrapper.start.html"}>

<{t section="User"}>Edit profile<{/t}>

<{t section="User"}>Here you can edit and update your company profile and change your password.<{/t}>


<{if isset($get.saved)}> <{include file="components/alert.html" variant="success" margin="b" text='Din profil blev opdateret. Dobbeltjek, at oplysningerne herunder er korrekte:'|t}> <{/if}>

<{t section="User"}>Billing address<{/t}>

<{include file="components/label.html" for="company" text="Company"|t xclass="{'label--is-floating': company && company.length > 0 }" }> <{include file="components/input.html" name="company" type="text" placeholder="Company"|t inputmode="text" autocomplete="name" xclass="{'input--has-value': company && company.length > 0 }" xmodel="company" xvalue="company ? company : ''" xref="company" }>
<{include file="components/label.html" for="vat" text="vat"|t xclass="{'label--is-floating': vat && vat.length > 0 }" }> <{include file="components/input.html" name="vat_number" type="text" placeholder="Vat"|t inputmode="text" autocomplete="name" xclass="{'input--has-value': vat && vat.length > 0 }" xmodel="vat" xvalue="vat ? vat : ''" xref="vat" }>
<{include file="components/label.html" for="name" text="Name"|t required="true" xclass="{'label--is-floating': order_name && order_name.length > 0 }" }> <{include file="components/input.html" name="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" }>
<{include file="components/label.html" for="phone" text="Phone"|t xclass="{'label--is-floating': phone && phone.length > 0 }" }> <{include file="components/input.html" name="phone" type="text" placeholder="Phone"|t inputmode="tel" autocomplete="tel" xclass="{'input--has-value': phone && phone.length > 0 }" xmodel="phone" xvalue="phone" xref="phone" }>
<{include file="components/label.html" for="address" text="Delivery address"|t xclass="{'label--is-floating': address && address.length > 0 }" }> <{include file="components/input.html" name="address" type="text" placeholder="Delivery address"|t inputmode="text" autocomplete="off" xclass="{'input--has-value': address && address.length > 0 }" xmodel="address" xvalue="address" xref="address" }>
<{include file="components/label.html" for="zipcode" text="Zipcode"|t xclass="{'label--is-floating': zipcode && zipcode.length > 0 }" }> <{include file="components/input.html" name="zipcode" type="text" placeholder="Zipcode"|t inputmode="text" autocomplete="postal-code" xclass="{'input--has-value': zipcode && zipcode.length > 0 }" xmodel="zipcode" xvalue="zipcode" xref="zipcode" }>
<{include file="components/label.html" for="city" text="City"|t xclass="{'label--is-floating': city && city.length > 0 }" }> <{include file="components/input.html" name="city" type="text" inputmode="text" placeholder="City"|t autocomplete="address-level2" xclass="{'input--has-value': city && city.length > 0 }" xmodel="city" xvalue="city" xref="city" }>
<{assign var="countries" value=$webshop->getCountries()}> <{if $countries|@count> 1}> <{include file="components/label.html" for="country_id" text="Country"|t class="label--is-floating" }> <{capture name='country_id_options'}> <{section name="i" loop=$countries}> <{/section}> <{/capture}> <{include file="components/select.html" name="country_id" autocomplete="country-name" options=$smarty.capture.country_id_options class="form-select--has-value" xmodel="country_id" xvalue="country_id" xref="country_id" }> <{else}> <{include file="components/label.html" for="country_id" text="Country"|t class="label--is-floating" }> <{include file="components/input.html" name="country_id" type="text" readonly="true" inputmode="text" class="input--has-value input--readonly" value=$countries[0]->getName() }> <{/if}>
<{assign var="fields" value=$webshop->getCustomerFields()}> <{if $fields}>

<{t section="User"}>Other information<{/t}>

<{section name="i" loop=$fields}> <{if $fields[i]->getType() == "list"}> <{assign var="values" value=$fields[i]->getValues()}> <{assign var="selected" value=$fields[i]->getVal()}>
<{elseif $fields[i]->getType() == "string"}>
<{/if}> <{/section}>
<{/if}>

<{t section="User"}>Alternate shipping address<{/t}>

<{include file="components/label.html" for="shipping_name" text="Name"|t xclass="{'label--is-floating': shipping_name && shipping_name.length > 0 }" }> <{include file="components/input.html" name="shipping_name" type="text" placeholder="Name"|t inputmode="text" autocomplete="name" xclass="{'input--has-value': shipping_name && shipping_name.length > 0 }" xmodel="shipping_name" xvalue="shipping_name" xref="shipping_name" }>
<{include file="components/label.html" for="shipping_address" text="Delivery address"|t xclass="{'label--is-floating': shipping_address && shipping_address.length > 0 }" }> <{include file="components/input.html" name="shipping_address" type="text" placeholder="Delivery address"|t inputmode="text" autocomplete="off" xclass="{'input--has-value': shipping_address && shipping_address.length > 0 }" xmodel="shipping_address" xvalue="shipping_address" xref="shipping_address" }>
<{include file="components/label.html" for="shipping_zipcode" text="Zipcode"|t xclass="{'label--is-floating': shipping_zipcode && shipping_zipcode.length > 0 }" }> <{include file="components/input.html" name="shipping_zipcode" type="text" placeholder="Zipcode"|t inputmode="text" autocomplete="postal-code" xclass="{'input--has-value': shipping_zipcode && shipping_zipcode.length > 0 }" xmodel="shipping_zipcode" xvalue="shipping_zipcode" xref="shipping_zipcode" }>
<{include file="components/label.html" for="shipping_city" text="City"|t xclass="{'label--is-floating': shipping_city && shipping_city.length > 0 }" }> <{include file="components/input.html" name="shipping_city" type="text" inputmode="text" placeholder="City"|t autocomplete="address-level2" xclass="{'input--has-value': shipping_city && shipping_city.length > 0 }" xmodel="shipping_city" xvalue="shipping_city" xref="shipping_city" }>
<{if $countries}>
<{if $countries|@count> 1}> <{include file="components/label.html" for="shipping_country_id" text="Country"|t class="label--is-floating" }> <{capture name='del_country_id_options'}> <{section name="i" loop=$countries}> <{/section}> <{/capture}> <{include file="components/select.html" name="shipping_country_id" autocomplete="country-name" options=$smarty.capture.country_id_options class="form-select--has-value" xmodel="shipping_country_id" xvalue="shipping_country_id" xref="shipping_country_id" }> <{else}> <{include file="components/label.html" for="shipping_country_id" text="Country"|t class="label--is-floating" }> <{include file="components/input.html" name="shipping_country_id" type="text" readonly="true" inputmode="text" class="input--has-value input--readonly" value=$countries[0]->getName() }> <{/if}>
<{/if}>

<{t section="User"}>Change password<{/t}>

<{include file="components/label.html" for="pass1" text="New password"|t xclass="{'label--is-floating': pass1 && pass1.length > 0 }" }> <{include file="components/input.html" name="pass1" type="password" placeholder="New password"|t inputmode="text" xclass="{'input--has-value': pass1 && pass1.length > 0 }" xmodel="pass1" xvalue="pass1" xref="pass1" autocomplete="new-password" }>
<{include file="components/label.html" for="pass2" text="Repeat new password"|t xclass="{'label--is-floating': pass2 && pass2.length > 0 }" }> <{include file="components/input.html" name="pass2" type="password" placeholder="Repeat new password"|t inputmode="text" xclass="{'input--has-value': pass2 && pass2.length > 0 }" xmodel="pass2" xvalue="pass2" xref="pass2" autocomplete="new-password" }>
Opdater profil<{/t}>" class="btn btn--primary mt-5" @click="localStorage.clear();">
<{include file="partials/user.profile.wrapper.end.html"}> <{include file="partials/footer.html"}>