Следуйте инструкциям в видео ниже, чтобы узнать, как установить наш сайт как веб-приложение на главный экран вашего устройства.
Примечание: Эта функция может быть недоступна в некоторых браузерах.
if($(".fn_validate_cart").length>0) {
$(".fn_validate_cart").validate({
rules: {
name: "required",
email: {
required: false,
email: true
},
phone: {
required: true,
phone: true
},
captcha_code: "required"
},
messages: {
name: form_enter_name,
email: form_enter_email,
phone: form_enter_phone,
captcha_code: form_error_captcha
}
});
{* User's phone *}
<div class="f_col-md-6 f_col-lg-12 f_col-xl-6">
<div class="form__group">
<input class="form__input form__placeholder--focus" name="phone" type="text" value="{$request_data.phone|escape}" data-language="form_phone" >
<span class="form__placeholder">{$lang->form_phone}*</span>{*добавить звездочку*}
</div>
</div>
{* User's email *}
<div class="f_col-md-6 f_col-lg-12 f_col-xl-6">
<div class="form__group">
<input class="form__input form__placeholder--focus" name="email" type="text" value="{$request_data.email|escape}" data-language="form_email" >
<span class="form__placeholder">{$lang->form_email}</span>{*удалить звездочку*}
</div>
</div>
public function getCartValidateError($order)
{
$captchaCode = $this->request->post('captcha_code', 'string');
$error = null;
if (!$this->validator->isName($order->name, true)) {
$error = 'empty_name';
} elseif (!$this->validator->isEmail($order->email)) {
$error = 'empty_email';
} elseif (!$this->validator->isPhone($order->phone, true)) {
$error = 'empty_phone';
} elseif (!$this->validator->isAddress($order->address)) {
$error = 'empty_address';
} elseif (!$this->validator->isComment($order->comment)) {
$error = 'empty_comment';
} elseif ($this->settings->get('captcha_cart') && !$this->validator->verifyCaptcha('captcha_cart', $captchaCode)) {
$error = 'captcha';
}
return ExtenderFacade::execute(__METHOD__, $error, func_get_args());
}