News:

AbanteCart v1.4.2.1 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Create Account AbanteCart v1.2.15

Started by HADY, February 25, 2020, 02:41:13 AM

Previous topic - Next topic

HADY

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...


HADY

Quote from: Sam_78 on February 25, 2020, 12:15:15 PM
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...


HADY

Quote from: Basara on February 26, 2020, 03:19:35 AM
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...

HADY

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.

Basara


HADY

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)) {

Forum Rules Code of conduct
AbanteCart.com 2010 -