fitgura Posted September 7, 2009 Share Posted September 7, 2009 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 helpps: I use ps 1.1.0.5 version Link to comment Share on other sites More sharing options...
Floobynooby Posted September 7, 2009 Share Posted September 7, 2009 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 More sharing options...
rocky Posted September 7, 2009 Share Posted September 7, 2009 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 More sharing options...
fitgura Posted September 7, 2009 Author Share Posted September 7, 2009 A big thanx for all of you!!!I did it!!! yes it is working and I'm really happy right now!!!Thanks RockyTo 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 More sharing options...
benofino Posted October 8, 2009 Share Posted October 8, 2009 Hi did this modification, working well. However the little * is grey instead of red... Link to comment Share on other sites More sharing options...
MikeG Posted October 13, 2009 Share Posted October 13, 2009 Hi did this modification, working well. However the little * is grey instead of red... You also need to change this : into : in the address.tpl and authentication.tpl files Link to comment Share on other sites More sharing options...
benofino Posted October 14, 2009 Share Posted October 14, 2009 Merci man. Ça marche maintenant. Link to comment Share on other sites More sharing options...
amandloren Posted October 24, 2009 Share Posted October 24, 2009 ;-) super merci !ça marche ! Link to comment Share on other sites More sharing options...
alphaZ Posted May 28, 2010 Share Posted May 28, 2010 this modification sucks it doesn't work for me Link to comment Share on other sites More sharing options...
alphaZ Posted May 28, 2010 Share Posted May 28, 2010 solvedshould set var $compile_check = true in Smarty.class.phpnow its workin... Link to comment Share on other sites More sharing options...
Klixin Posted July 16, 2010 Share Posted July 16, 2010 I did this mod, now when i go as a customer and click update address or add address i get a blank inner screen. nothing loads up.anyone get this? Link to comment Share on other sites More sharing options...
deepee Posted July 16, 2010 Share Posted July 16, 2010 It works fine for me.Check your punctuation for errors, extra spaces etc. Link to comment Share on other sites More sharing options...
Klixin Posted July 16, 2010 Share Posted July 16, 2010 Ok i found out what the problem was.First thing I did was the same as what this fella didhttp://www.prestashop.com/forums/viewthread/35091/installing_prestashop/problem_with_change_addresses_and_update_addressesand 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 attemptHack 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 More sharing options...
ToXo Posted November 3, 2010 Share Posted November 3, 2010 Hi Rocky, where can I find those authentication.tpl ?I found only authentication.php and there are no such lines as you mentioned, please help me with thisThanks Link to comment Share on other sites More sharing options...
rocky Posted November 4, 2010 Share Posted November 4, 2010 They are in your theme's directory. Link to comment Share on other sites More sharing options...
lafondadebaco Posted January 4, 2011 Share Posted January 4, 2011 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 More sharing options...
Steffen Posted January 5, 2011 Share Posted January 5, 2011 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 More sharing options...
rocky Posted January 5, 2011 Share Posted January 5, 2011 Perhaps you are looking at the wrong prefix? Do you have multiple PrestaShops installed in the same database? Link to comment Share on other sites More sharing options...
lafondadebaco Posted January 5, 2011 Share Posted January 5, 2011 Yes, that is the right place.Have you followed all steps as rocky described? What error are you getting? Link to comment Share on other sites More sharing options...
Steffen Posted January 5, 2011 Share Posted January 5, 2011 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 More sharing options...
rocky Posted January 5, 2011 Share Posted January 5, 2011 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 More sharing options...
KGI Posted January 6, 2011 Share Posted January 6, 2011 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 youIan Link to comment Share on other sites More sharing options...
KGI Posted January 6, 2011 Share Posted January 6, 2011 Hey NondoNondo 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.CheersIan Link to comment Share on other sites More sharing options...
fishordog Posted June 1, 2011 Share Posted June 1, 2011 How i can remove phone from required?the code is protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'city');but my address2 and phone are still required Link to comment Share on other sites More sharing options...
Lem Posted June 1, 2011 Share Posted June 1, 2011 How i can remove phone from required?the code is protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'city');but my address2 and phone are still required You need to change a number of things - See;http://www.prestashop.com/forums/viewthread/100841/ Link to comment Share on other sites More sharing options...
Matija Marric Posted June 1, 2011 Share Posted June 1, 2011 Excellent work here with me Link to comment Share on other sites More sharing options...
malcek Posted September 28, 2011 Share Posted September 28, 2011 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 Link to comment Share on other sites More sharing options...
noesac Posted October 27, 2011 Share Posted October 27, 2011 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 More sharing options...
aladiw Posted May 6, 2012 Share Posted May 6, 2012 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 More sharing options...
aliaspt Posted October 26, 2012 Share Posted October 26, 2012 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 More sharing options...
Recommended Posts