Jump to content

Mobile phone number is a MUST during registration


Recommended Posts

Hi guys!

First of all, I would say a great thanks for the prestaTeam about this product!

And I have an issue what can't solve alone:

I could need to modify the registration form, to show that the mobile number is a required field during the registration!!!

Can I do this somehow??? Could help me somebody where and how to proceed this????????

Thanks for your help

:)

ps: I use ps 1.1.0.5 version

Link to comment
Share on other sites

So what about potential customers who don't have a mobile phone? (not everyone has one) Are you going to turn them away?
The code for this may help though its validating the phone for the contact page, which I guess may be kind of similar.
http://www.prestashop.com/forums/viewthread/11123/P15/modules___code_contributions/creation_of_new_fields_in_the_contact_form

Link to comment
Share on other sites

I'm using v1.2, but this should work on v1.1 too. You need to modify line 80 of classes/Address.php. Change it from:

protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city');



to:

protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city', 'phone_mobile');



You then need to find each line like the following in address.tpl and authentication.tpl:

<input type="text" id="phone_mobile" name="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{else}{$address->phone_mobile|escape:'htmlall':'UTF-8'}{/if}" />



then add the following after:

*



to add a red star after the mobile text fields so the user knows they are required.

Link to comment
Share on other sites

A big thanx for all of you!!!

I did it!!! yes it is working and I'm really happy right now!!!

Thanks Rocky

To Floobynooby: I think in 2009 who use an internet for buying, that person deffenetly has a cellphone (I hope so) !! because we will need to call the customers back to filtering the fake orders!!!

Anyway it could be an idea for the next ps revision, to take parts of the registration form optional switchable , because the registation is the most important part of the shop!!!

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 7 months later...
  • 1 month later...

Ok i found out what the problem was.

First thing I did was the same as what this fella did

http://www.prestashop.com/forums/viewthread/35091/installing_prestashop/problem_with_change_addresses_and_update_addresses

and then just re-modded it, and it worked fine.. so yeah i stuffed up somewhere.

But then i went to put in a mobile number and hit save it came up with this hack attempt
Hack attempt (Address -> phone_mobile is empty)

So i went into phpmyadmin and placed a whole bunch of 000000's in phone_mobile in everyones ps_address that didnt put in a mobile number from the start (because it wasnt required back then).

If they put in a mobile number from the start it didnt make a hack attempt.

So this just means when they decide to go in an update their mobile numbers it wont come up with a hack attempt.


many thanks.

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
Ok i found out what the problem was.....

So i went into phpmyadmin and placed a whole bunch of 000000's in phone_mobile in everyones ps_address that didnt put in a mobile number from the start (because it wasnt required back then).

....
.


Thanks Klixin! your solution works excellent for me after hours of burning my eyes. THANKS!!!
Link to comment
Share on other sites

Ok i found out what the problem was.....

So i went into phpmyadmin and placed a whole bunch of 000000's in phone_mobile in everyones ps_address that didnt put in a mobile number from the start (because it wasnt required back then).

....
.


Thanks Klixin! your solution works excellent for me after hours of burning my eyes. THANKS!!!

I tried to do the same, but when I open phpmyadmin -> ps_address it only comes up with two customers - the default John Doe and STEVE JOBS...

Am I looking the wrong place?
Link to comment
Share on other sites

Perhaps you are looking at the wrong prefix? Do you have multiple PrestaShops installed in the same database?


Found it - they were located under "ps_nondoaddress" ...

EDIT: By the way, can I safely delete customers (like test registrations and such) individually under phpmyadmin? I know I can delete them in BO, but they're not completely deleted as the same e-mail address can not be used again.
Link to comment
Share on other sites

Yes, deleting customers from the database is safe, as long as you don't have any real orders linked to them. That's why the Back Office only disabled customers instead of deleting them, so that the customer information is still linked in their orders.

Link to comment
Share on other sites

Hi - Just thought we would add a few words to this post.

As we still use 1.2.4 on our ps sites we also wanted to make a telephone number required when the customer registers.

We followed all the post on this subject and implemented all the changes.

We also wanted to add that whilst the brain is in PS editied mode the phpmyadmin is actually part of your ISP control pannel which is nothing to do with PS and inside the CP you can view and edit and also export/import alsorts of data.

So updating and editing was really easy.

We rate this post and its fix 10/10 and would like to say thank you to all those who yet again put their time to keyboard and shared their knowledge base with us.

Thank you

Ian

Link to comment
Share on other sites

Hey Nondo

Nondo wrote:- By the way, can I safely delete customers (like test registrations and such) individually under phpmyadmin? I know I can delete them in BO, but they’re not completely deleted as the same e-mail address can not be used again.


We answered:-

If you go into your ISP Control Panel and into phpmyadmin and select the data base for your PS shop (if you have any other data bases) then look for folder "customers"

Choose this folder and then find the customer that you deleted (or as we know switched off) click the edit button and you will then be able to edit the email address. Change it to something eles - not sure what would happen if anything should actually delete the email address since that customer record is no longer going to be used any way.


Hope that helps you.

Cheers

Ian

Link to comment
Share on other sites

  • 4 months later...
  • 3 months later...
  • 4 weeks later...

Hi Rocky,

 

I just looked at classes/address.php and found this:

 

protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city');

 

I want to make the State field non-mandatory...but it's not currently in the code above. How can it be mandatory then? Any ideas?

Link to comment
Share on other sites

  • 6 months later...

Hi,

I have a similar thing. I would like to have by default checked Sign in the newsletter and news in registration page. Where to modify this. I'm using prestashop 1.4.4.1

 

same problem..everybody please help..

Link to comment
Share on other sites

  • 5 months later...

Asked someone to do the modification to have phone number required during checkout and now returning customers get Hack Attempt error during checkout.

What is a quick way to add "00000" to the phone column in ps_address? Should I export and then import the table? I have no knowledge with phpAdmin and it scares me! Are there instructions how to do that safely without screwing up the whole store?

Thank you!

Link to comment
Share on other sites

×
×
  • Create New...