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

Offline HADY

  • Full Member
  • ***
  • Posts: 175
  • Karma: +16/-1
    • 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 »
-----------------------------
Regards
HADY

Offline Sam_78

  • Full Member
  • ***
  • Posts: 221
  • Karma: +40/-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

  • Full Member
  • ***
  • Posts: 175
  • Karma: +16/-1
    • 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...
-----------------------------
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4586
  • Karma: +224/-0
    • View Profile
“Chuck Norris is so amazing.”
― Mother Teresa

Offline HADY

  • Full Member
  • ***
  • Posts: 175
  • Karma: +16/-1
    • 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...
-----------------------------
Regards
HADY

Offline HADY

  • Full Member
  • ***
  • Posts: 175
  • Karma: +16/-1
    • 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.
-----------------------------
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4586
  • Karma: +224/-0
    • View Profile
Re: Create Account AbanteCart v1.2.15
« Reply #6 on: February 26, 2020, 08:14:09 AM »
Yes, please share  ;)
“Chuck Norris is so amazing.”
― Mother Teresa

Offline HADY

  • Full Member
  • ***
  • Posts: 175
  • Karma: +16/-1
    • 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)) {
-----------------------------
Regards
HADY

 

Powered by SMFPacks Social Login Mod