Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Create Account AbanteCart v1.2.15  (Read 3628 times)

Offline HADY

  • Sr. Member
  • ****
  • Posts: 324
  • Karma: +27/-5
    • View Profile
Create Account AbanteCart v1.2.15
« 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...
« Last Edit: February 25, 2020, 02:42:57 AM by HADY »
Thank you In Advanced
Regards
HADY

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: Create Account AbanteCart v1.2.15
« Reply #1 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

Offline HADY

  • Sr. Member
  • ****
  • Posts: 324
  • Karma: +27/-5
    • View Profile
Re: Create Account AbanteCart v1.2.15
« Reply #2 on: February 26, 2020, 03:11:55 AM »
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...
Thank you In Advanced
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5753
  • Karma: +273/-2
    • View Profile

Offline HADY

  • Sr. Member
  • ****
  • Posts: 324
  • Karma: +27/-5
    • View Profile
Re: Create Account AbanteCart v1.2.15
« Reply #4 on: February 26, 2020, 04:51:07 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...
Thank you In Advanced
Regards
HADY

Offline HADY

  • Sr. Member
  • ****
  • Posts: 324
  • Karma: +27/-5
    • View Profile
Re: Create Account AbanteCart v1.2.15
« Reply #5 on: February 26, 2020, 07:14:42 AM »
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.
Thank you In Advanced
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5753
  • Karma: +273/-2
    • View Profile
Re: Create Account AbanteCart v1.2.15
« Reply #6 on: February 26, 2020, 08:14:09 AM »
Yes, please share  ;)

Offline HADY

  • Sr. Member
  • ****
  • Posts: 324
  • Karma: +27/-5
    • View Profile
Re: Create Account AbanteCart v1.2.15
« Reply #7 on: February 26, 2020, 08:33:05 AM »
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)) {
Thank you In Advanced
Regards
HADY

 

Powered by SMFPacks Social Login Mod