Post by OSWorX » Wed Jan 13, 2010 2:17 am

As with the latest (1.4.0.0.) version (i do not how it was earlier), I am not able to DISable some fields as admin.

For example: allow me to disable the field Telephone, therefore new users are not required to fill in this field (which is done often with obstruse numbers).
Or let me (the store owner) define which field is required and which field shall be shown (except those which are required by local laws).

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Qphoria » Wed Jan 13, 2010 3:40 am

At this time, the create form is very much hardcoded. The only way to disable them is the edit the account tpl files and the controller to remove the validation steps. It is due for an overhaul... hopefully soon.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dangkhoaweb » Wed Jan 13, 2010 11:40 am

In the account tpl files, just add style to input "display:none", and remove validation in controler as Qphoria said

Newbie

Posts

Joined
Wed Jan 13, 2010 11:34 am

Post by CUSTOM_UK » Wed Feb 24, 2010 4:57 am

Hi, I'm new to Opencart, can anyone expand on exactly which files and code elements I need to alter the telephone field to lose it's 'required' status. Many of my customers are international, so it is of limited use to many of us.

Any help or guidance would be much appreciated.... Thanks

New member

Posts

Joined
Tue Feb 23, 2010 8:28 pm

Post by Qphoria » Wed Feb 24, 2010 5:45 am

catalog/controller/account/create.php

find and remove

Code: Select all

if ((strlen(utf8_decode($this->request->post['telephone'])) < 3) || (strlen(utf8_decode($this->request->post['telephone'])) > 32)) {
      		$this->error['telephone'] = $this->language->get('error_telephone');
    	}

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by CUSTOM_UK » Wed Feb 24, 2010 6:12 am

Thanks for that. Throws up an error message, so can you point me in the direction of any other files I need to alter. Can see higher in this thread it talks about removing the validation. Not sure which contoller though as folder of that name in two separate locations.

Thanks

New member

Posts

Joined
Tue Feb 23, 2010 8:28 pm

Post by rph » Wed Feb 24, 2010 12:23 pm

The error message should say what file it is.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by CUSTOM_UK » Wed Feb 24, 2010 6:04 pm

OK. I finally got it sorted. ;D

To anyone else that wants to remove the forced telephone field in the checkout process, here is the EASY way to achieve it.

Go to catalog/view/template/account/create. Look for the telephone field that has >*< on it. Delete the asterisk ONLY. Then go to catalog/view/template/checkout/guest_step_1 and delete that asterisk.

Next step: Go to catalog/controller/account/ create. Look for the telephone field that has validation of < 3 on it. Change the 3 for a zero. Then go to catalog/controller/checkout/guest_step_1 and change the same 3 for a zero.

Job Done. :)

New member

Posts

Joined
Tue Feb 23, 2010 8:28 pm

Post by dragonfly » Sat Apr 24, 2010 9:05 pm

Thanks CUSTOM_UK for such a simple list of instructions.
Even I managed to make the change in my install (1.4.7) and it works without any probs!

If only everything else was that simple....

Many thanks.
Rachel

New member

Posts

Joined
Sat Jan 30, 2010 8:13 pm
Location - Wiltshire, UK
Who is online

Users browsing this forum: No registered users and 5 guests