AbanteCart Community
eCommerce construction => Installation and Configuration => Topic started by: HADY on February 25, 2020, 02:41:13 AM
-
Hello!
I need your help to add some required fields in Creating account for new clients please. Any documentation about this please?? I will appreciate your support because this is very important. The problem is some fields is optional and I would like to change it to required.
NOTE: I use AbanteCart v1.2.15
God Blessing you...
-
Hi you can set values here
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/account/create.php#L207
change 'required' => false to true if you want it required
-
Hi you can set values here
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/account/create.php#L207
change 'required' => false to true if you want it required
Thanks for replying, I tried that since a time and modified that file but that's only mark the field as required but hasn't a power in the registration form, still people can register without including the Telephone and Company Name in the registration form. Am sure there is something else I have to modify to take act in the form . any ideas Guys ??
Thanks again...
-
Hi.
Try to add validation to the model file https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/account/customer.php#L629
-
Hi.
Try to add validation to the model file https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/account/customer.php#L629
Thanks for replying, I did that too. here is the content of this file in the attachment:
Is there anything wrong please?
Thanks for being helpful here...
-
Hi community!
I fixed the issue of telephone to make it required. I still have the issue with company name doesn't worked yet. if someone need the details I can share details.
-
Yes, please share ;)
-
Changing next link:
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/account/customer.php#L681
TO
if (!$data['telephone'] && (mb_strlen($data['telephone']) < 3 || mb_strlen($data['telephone']) > 32)) {