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).
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
In the account tpl files, just add style to input "display:none", and remove validation in controler as Qphoria said
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
Any help or guidance would be much appreciated.... Thanks
catalog/controller/account/create.php
find and remove
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');
}
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
Thanks
OK. I finally got it sorted.
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.
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.
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
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
Who is online
Users browsing this forum: No registered users and 15 guests