Hi.
I'm using "Simple one page" checkout form in my website, but I see that in this modification email field is not required, what is quite strange for me.
Please, can you help me to solve this issue, and make this field as - required field? Will be awesome, if it is possible to add some validation rules, for example if it's empty after button "Confirm order" pushed - show error "empty email" under the field. Or even to check if email contains such symbol as "@" ?
Thank you so much, guys!
well, just to give you an idea on one matter, in the:
category/controller/checkout/onepagecheckout.php
the 'error-handler' routine, shown below,
seems to be missing in the:
Section: (corrected, first used v.1.5.6.Code
)
(limited to min8 and max42 characters)
and in the
... theme/template/checkout/onepagecheckout.tpl
the:
needs to look like:
then, at least, you would be 2 steps further, i GUESS!
Good Luck, but don't come back on me, I cannot test it
Ernie
category/controller/checkout/onepagecheckout.php
the 'error-handler' routine, shown below,
seems to be missing in the:
Code: Select all
public function validate_form()
{

Code: Select all
if ((utf8_strlen(trim($this->request->post['email'])) < 8) || (utf8_strlen(trim($this->request->post['email'])) > 42)) {
$data['error']['email'] = $this->language->get('error_email');
}
and in the
... theme/template/checkout/onepagecheckout.tpl
the:
Code: Select all
<label for="email-ch"> <?=$text_email?>:</label><br>
Code: Select all
<label for="email-ch"><span class="required">*</span> <?=$text_email?>:</label><br>
Good Luck, but don't come back on me, I cannot test it

Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 2 guests