{** * 2010-2022 Webkul. * * NOTICE OF LICENSE * * All right is reserved, * Please go through LICENSE.txt file inside our module * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade this module to newer * versions in the future. If you wish to customize this module for your * needs please refer to CustomizationPolicy.txt file inside our module for more information. * * @author Webkul IN * @copyright 2010-2022 Webkul IN * @license LICENSE.txt *}
{$HOOK_CREATE_ACCOUNT_TOP}

*{l s='Required field'}

{l s='OR'}

{l s='Create a customer account using above details.'}

{l s='(five characters min.)'}
{if $PS_CUSTOMER_ADDRESS_CREATION}
{if isset($newsletter) && $newsletter}
{if array_key_exists('newsletter', $field_required)} * {/if}
{/if} {if isset($optin) && $optin}
{if array_key_exists('optin', $field_required)} * {/if}
{/if}

{l s='RESIDENTIAL ADDRESS'}

{$stateExist = false} {$postCodeExist = false} {$dniExist = false}
{foreach from=$dlv_all_fields item=field_name} {if $field_name eq "firstname"}
{elseif $field_name eq "lastname"}
{elseif $field_name eq "address1"}
{elseif $field_name eq "address2"}
{elseif $field_name eq "city"}
{elseif $field_name eq "postcode"} {$postCodeExist = true}
{elseif $field_name eq "company"}
{elseif $field_name eq "vat_number"} {elseif $field_name eq "dni"} {assign var='dniExist' value=true}
{l s='DNI / NIF / NIE'}
{elseif $field_name eq "country" || $field_name eq "Country:name"}
{elseif $field_name eq "state" || $field_name eq 'State:name'} {$stateExist = true} {/if} {/foreach} {if !$postCodeExist}
{/if} {if !$stateExist}
{/if} {if !$dniExist}
{l s='DNI / NIF / NIE'}
{/if}
{if isset($one_phone_at_least) && $one_phone_at_least} {assign var="atLeastOneExists" value=true}

** {l s='You must register at least one phone number.'}

{/if}

*{l s='Required field'}

{/if} {$HOOK_CREATE_ACCOUNT_FORM}
{strip} {if isset($guestInformations) && isset($guestInformations.id_state) && $guestInformations.id_state} {addJsDef idSelectedState=$guestInformations.id_state|intval} {else} {addJsDef idSelectedState=false} {/if} {if isset($guestInformations) && isset($guestInformations.id_state_invoice) && $guestInformations.id_state_invoice} {addJsDef idSelectedStateInvoice=$guestInformations.id_state_invoice|intval} {else} {addJsDef idSelectedStateInvoice=false} {/if} {if isset($guestInformations) && isset($guestInformations.id_country) && $guestInformations.id_country} {addJsDef idSelectedCountry=$guestInformations.id_country|intval} {else} {addJsDef idSelectedCountry=false} {/if} {if isset($guestInformations) && isset($guestInformations.id_country_invoice) && $guestInformations.id_country_invoice} {addJsDef idSelectedCountryInvoice=$guestInformations.id_country_invoice|intval} {else} {addJsDef idSelectedCountryInvoice=false} {/if} {if isset($countries)} {addJsDef countries=$countries} {/if} {addJsDef PS_CUSTOMER_ADDRESS_CREATION=$PS_CUSTOMER_ADDRESS_CREATION|intval} {/strip}