itcwebman Posted January 11, 2012 Share Posted January 11, 2012 hello I have been making some modifications to this file. I have successfully removed the "receive offers from our partners bit" (after i realise that there are 2 bits to comment out!!) i am trying to make date of birth a required field as we are selling age sensitive products. I have a changed the class to "required select" but I figure there must be more to it than this as it doesn't make it a required section! I have also commented out the "address alias" bit but the website is still asking for it. any help asap please?! thanks in anticipation Link to comment Share on other sites More sharing options...
Snade Posted January 12, 2012 Share Posted January 12, 2012 Hi, you cannot just comment the address alias, since its essential for prestashop, in order to support multiple adresses. But since its auto-filled, I guess it will still work if its hidden by css, with display:none. To hide it, add this code in autentification.css(or global.css) #address_alias { display: none; } The required fields are stated required in /classes/Customer.php in line protected $fieldsRequired = array('lastname', 'passwd', 'firstname', 'email'); make it protected $fieldsRequired = array('lastname', 'passwd', 'firstname', 'email', 'birthday'); Let me know if this solves it for you. If it does, dont forget to add [solved] in the topic name, and also I'll be happy if you "like" my post, if it was helpfull to you. Thanks ! 3 Link to comment Share on other sites More sharing options...
itcwebman Posted January 15, 2012 Author Share Posted January 15, 2012 thanks, that worked wonderfully! Link to comment Share on other sites More sharing options...
itcwebman Posted January 16, 2012 Author Share Posted January 16, 2012 hellllllllppp please! i forgot to actually test this all the way through and it's not letting users register. there seems to be 2 "birthday" fields in Prestashop. there is "birthday" but the one actually used consistes of 3 fields "days"< "months" and "years". i protected these fields, but then the system comes up with a fatal error when trying to post the information to day "days" is empty (i suspest it would for all but days is first in the line). i tried protecting "birthday" but this isn't actually a field so it doesn't work, any other suggestions? Link to comment Share on other sites More sharing options...
Snade Posted January 17, 2012 Share Posted January 17, 2012 Hi, before I posted the solution in first place, I tested it. Now I tested it again, just in case, and again it works for me. See the attached img, this is the error when no birthday is entered(ignore the mobile error) Also, it gives error when the birth is not entered correctly(see img 2). Then when I enter birthday, everything is just fine. The first time I tested it on 1.4.5.1 version, now I tested it on 1.4.6.2. What version do you use, and do you use opc, maybe that can cause problems. here is the code from the working example (with few lines before and after the edited line) .... public $months; protected $tables = array ('customer'); protected $fieldsRequired = array('lastname', 'passwd', 'firstname', 'email', 'birthday'); protected $fieldsSize = array('lastname' => 32, 'passwd' => 32, 'firstname' => 32, 'email' => 128, 'note' => 65000); .... Link to comment Share on other sites More sharing options...
itcwebman Posted January 17, 2012 Author Share Posted January 17, 2012 hello, thanks for replying. I have tried it again and am still getting the error. - plesae see attached file. i am on version 1.4.3 - could that present a problem? there does seem to be some update file for later versions to do with birthday. untitled.bmp Link to comment Share on other sites More sharing options...
Snade Posted January 17, 2012 Share Posted January 17, 2012 my solution is for version 1.4.6.2 This must be the issue here. I guess you'll have to play a little with the code and try to get it working Good luck Link to comment Share on other sites More sharing options...
itcwebman Posted January 18, 2012 Author Share Posted January 18, 2012 thanks for your help. i have now upgraded to 1.4.6.2 so will try the changing the file again tonight Link to comment Share on other sites More sharing options...
itcwebman Posted January 19, 2012 Author Share Posted January 19, 2012 upgraded and all birthday now under required list. many thanks for your help Link to comment Share on other sites More sharing options...
cardnpaste Posted December 27, 2012 Share Posted December 27, 2012 Hi, before I posted the solution in first place, I tested it. Now I tested it again, just in case, and again it works for me. See the attached img, this is the error when no birthday is entered(ignore the mobile error) Also, it gives error when the birth is not entered correctly(see img 2). Then when I enter birthday, everything is just fine. The first time I tested it on 1.4.5.1 version, now I tested it on 1.4.6.2. What version do you use, and do you use opc, maybe that can cause problems. here is the code from the working example (with few lines before and after the edited line) .... public $months; protected $tables = array ('customer'); protected $fieldsRequired = array('lastname', 'passwd', 'firstname', 'email', 'birthday'); protected $fieldsSize = array('lastname' => 32, 'passwd' => 32, 'firstname' => 32, 'email' => 128, 'note' => 65000); .... Hi I have the same problem of having the 2 error messages after upgrading to 1.5.2, Also, i cannot find the above codes in /classes/Customer.php. Anyone can assist? Must appreciated! Link to comment Share on other sites More sharing options...
Rohit Singhal Posted January 13, 2013 Share Posted January 13, 2013 I am facing the same issue in 1.5.2 Link to comment Share on other sites More sharing options...
Recommended Posts