Я работаю с Prestashop 1.6, я не очень разбираюсь в PHP, но я хотел внести 1 изменение во внешний вид сайта. По умолчанию у меня 2 телефонных входа: для домашнего и мобильного. Это выглядит так:
<div style="display: none" class="form-group is_customer_param">
<label for="phone">{l s='Home phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>**</sup>{/if}</label>
<input type="text" class="text form-control validate" name="phone" id="phone" data-validate="isPhoneNumber" value="{if isset($guestInformations) && isset($guestInformations.phone) && $guestInformations.phone}{$guestInformations.phone}{/if}" />
</div>
<div class="{if isset($one_phone_at_least) && $one_phone_at_least}required {/if}form-group">
<label for="phone_mobile">{l s='Mobile phone'}{if isset($one_phone_at_least) && $one_phone_at_least} <sup>*</sup>{/if}</label>
<input type="text" class="text form-control validate" name="phone_mobile" id="phone_mobile" data-validate="isPhoneNumber" value="{if isset($guestInformations) && isset($guestInformations.phone_mobile) && $guestInformations.phone_mobile}{$guestInformations.phone_mobile}{/if}" />
</div>
{if isset($one_phone_at_least) && $one_phone_at_least}
{assign var="atLeastOneExists" value=true}
<p class="inline-infos required">* Podaj nr telefonu</p>
{/if}
Первую я сделал невидимой, так как думал, что одного заполненного поля будет достаточно. Так и есть. Но я могу отправить форму без ввода номера мобильного телефона. Вы видите, может быть, где здесь проблема? Или, может быть, как я могу заставить его работать?
Пример поля, которое работает хорошо, действительно необходимо и не связано с другим полем:
<div class="required form-group">
<label for="lastname_invoice">{l s='Last name'} <sup>*</sup></label>
<input type="text" class="form-control validate" id="lastname_invoice" name="lastname_invoice" data-validate="isName" value="{if isset($guestInformations) && isset($guestInformations.lastname_invoice) && $guestInformations.lastname_invoice}{$guestInformations.lastname_invoice}{/if}" />
</div>
Я пытался проверить мобильный телефон таким образом:
<div class="required phone_mobile form-group">
<label for="phone_mobile">{l s='Mobile phone'} <sup>*</sup></label>
<input type="text" class="text form-control validate" name="phone_mobile" id="phone_mobile" data-validate="isPhoneNumber" value="{if isset($guestInformations) && isset($guestInformations.phone_mobile) && $guestInformations.phone_mobile}{$guestInformations.phone_mobile}{/if}" />
</div>
но безуспешно...