This extension may provide what you need: https://www.opencart.com/index.php?rout ... n_id=21931 . However, it may require small adjustments for v3.x releases.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
You can do it manually using below steps:
1. from theme template file, catalog/view/theme/yourtheme/template/checkout/register.twig, hide/remove telephone field.
2. From controller file, catalog/controller/checkout/register.php, remove line $json['error']['telephone'] = $this->language->get('error_telephone');
You can use the extension to remove telephone field validation, https://www.opencart.com/index.php?rout ... n_id=32474
1. from theme template file, catalog/view/theme/yourtheme/template/checkout/register.twig, hide/remove telephone field.
2. From controller file, catalog/controller/checkout/register.php, remove line $json['error']['telephone'] = $this->language->get('error_telephone');
You can use the extension to remove telephone field validation, https://www.opencart.com/index.php?rout ... n_id=32474
Thanks,
Team Pamtechsolutions
dev@pamtechsolutions.com
View All My Extensions
Hey. Thanks for this 'hard coding' answer.
Just to add my own 2¢ it did work in oc 3.0.3.7 [not using the latest]
and removing the same lines from guest.php and guest.twig will also allow checkout for guests to not enter their #.
NOTE: I did not remove the lines however, I only commented them out in case I needed to revert.
EDIT: In order for this telephone hack to work you will also need to look for all the files that use the 'telephone' var and erase or comment out the needed lines.
PLUS ALSO: If wanted, one can just edit out the * [asterisk] before the telephone field and then find the correct lines in the correct file that cause an error if the field is empty. This way you can get the number but don't have to.
Just to add my own 2¢ it did work in oc 3.0.3.7 [not using the latest]
and removing the same lines from guest.php and guest.twig will also allow checkout for guests to not enter their #.
NOTE: I did not remove the lines however, I only commented them out in case I needed to revert.
EDIT: In order for this telephone hack to work you will also need to look for all the files that use the 'telephone' var and erase or comment out the needed lines.
PLUS ALSO: If wanted, one can just edit out the * [asterisk] before the telephone field and then find the correct lines in the correct file that cause an error if the field is empty. This way you can get the number but don't have to.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], khnaz35, paulfeakins and 16 guests