Post by jimmisavage » Sun Jan 18, 2015 4:16 am

At the moment it is essential that when registering an account the user must input a telephone number - is there a way to turn this off? I don't really care if they input a number or not.

New member

Posts

Joined
Sun Jan 11, 2015 9:32 pm

Post by IP_CAM » Sun Jan 18, 2015 5:09 am

a somehow similar question has been relplied to here:

http://forum.opencart.com/viewtopic.php?f=190&t=136422

Since you'll possibly require to have some sort of DATA in your Telephone Field, i order to make OC work, you could set all fields related to the phone number INVISIBLE. But still, you need to know what your'e doing, and test it out, whereever ths Tel.Number could be looked for. I don't think, even in OC2, that you can just shut it off tp make it go away...

Good Luck

Ernie
ipc.li

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

Post by jimmisavage » Sun Jan 18, 2015 5:17 am

IP_CAM wrote:a somehow similar question has been relplied to here:

http://forum.opencart.com/viewtopic.php?f=190&t=136422

Since you'll possibly require to have some sort of DATA in your Telephone Field, i order to make OC work, you could set all fields related to the phone number INVISIBLE. But still, you need to know what your'e doing, and test it out, whereever ths Tel.Number could be looked for. I don't think, even in OC2, that you can just shut it off tp make it go away...

Good Luck

Ernie
ipc.li
If it's just a case of having DATA in the telephone field could i possibly auto-populate it with 'not provided' or something similar? I have found a away to remove the red * so that would work just as well.

New member

Posts

Joined
Sun Jan 11, 2015 9:32 pm

Post by IP_CAM » Sun Jan 18, 2015 6:28 am

You cannot just 'remove' a 'required' - default Setting-Value, be aware of what your'e doing! It could suddenly 'stop' any further action or show an error message.... So, test it out. As I succested, I would enter a FIXED VALUE into the 'HIDDEN' Post Variable field, fully make the 'visible part' invisible and/or 'replace' what was there before with a custom text.
Ernie
ipc.li

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

Post by fido-x » Sun Jan 18, 2015 8:13 am

In catalog/controller/account/register.php at lines 367 to 369, you will find the following code:

Code: Select all

if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) {
	$this->error['telephone'] = $this->language->get('error_telephone');
}
Either delete or comment these lines.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by jimmisavage » Sun Jan 18, 2015 8:51 pm

fido-x wrote:In catalog/controller/account/register.php at lines 367 to 369, you will find the following code:

Code: Select all

if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) {
	$this->error['telephone'] = $this->language->get('error_telephone');
}
Either delete or comment these lines.
This worked for me - I then went to /catalog/view/theme/your theme/template/account/register.tpi and searched for telephone. I the changed <div class="form-group required"> to <div class="form-group"> which takes the little red * away :)

Thanks for all your help!

New member

Posts

Joined
Sun Jan 11, 2015 9:32 pm

Post by REW » Sat May 07, 2016 8:29 am

Last reply worked for me on Opencart 1.5.6.4

Except in theme/mytheme/template/account/register.tpl line 32 I just removed:

<span class="required">*</span>

REW
New member

Posts

Joined
Wed Feb 25, 2015 4:00 am
Who is online

Users browsing this forum: Amazon [Bot] and 26 guests