Post by Grannata » Tue May 30, 2017 12:41 am

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!

Newbie

Posts

Joined
Tue May 30, 2017 12:33 am

Post by IP_CAM » Wed May 31, 2017 9:57 am

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:

Code: Select all

public function validate_form()
{
Section: (corrected, first used v.1.5.6.Code :'( )

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');
}
(limited to min8 and max42 characters)
and in the
... theme/template/checkout/onepagecheckout.tpl
the:

Code: Select all

<label for="email-ch">   <?=$text_email?>:</label><br>
needs to look like:

Code: Select all

<label for="email-ch"><span class="required">*</span>   <?=$text_email?>:</label><br>
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

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 2 guests