gr4devel Posted August 29, 2013 Share Posted August 29, 2013 (edited) Community why if I select the one phone at least option in BO I can still register without supplying a phone number?! It seems to be a bug?! Btw: I've already found the piece of code that should handle this stuff (i.e. line 398 AuthController.php) P.S: the version of PS I'm talking about is the 1.5.4.1 as written in the topic title Edited August 29, 2013 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 29, 2013 Share Posted August 29, 2013 can you try with this: open classes/Address.php file you've got there address object definition, you can find there: 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), add to this para 'required' => true Link to comment Share on other sites More sharing options...
gr4devel Posted August 29, 2013 Author Share Posted August 29, 2013 (edited) As always let me thank you for the quick response and patience . I already know the possibility to override the Address.php but if I set required for phone and phone_mobile then I can't discriminate between the presence of only one of them. I need that at least one of the over mentioned fields is required. BTW I hoped to override less classes than in my previous experience with PS (PS 1.4.8) but it seems that there are still a lot of problems that must be solved through override. Edited August 29, 2013 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 29, 2013 Share Posted August 29, 2013 to be honest, i never tested it before, but it seems logic Link to comment Share on other sites More sharing options...
gr4devel Posted August 29, 2013 Author Share Posted August 29, 2013 (edited) Sorry but I totally disagree with you about the logic. The phone numbers must be checked where all the checks are done in PS. In the controllers. By modifying the Address.php you change the object model that describes the Address entity. However if there is a clear option in the BO and it don't work than there's a bug... Edited August 29, 2013 by gr4devel (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 29, 2013 Share Posted August 29, 2013 I partially agree, it will not be proper solution for this issue. Anyway, for me this option "one phone at least" works well, i suppose that it is "individual" issue Link to comment Share on other sites More sharing options...
gr4devel Posted August 29, 2013 Author Share Posted August 29, 2013 Ok if the option works maybe there's something more I should change in BO...mmm... I'll try to understand the problem and leave this topic open until I get it. For the moment let me thank you again for the help and the patience ! Link to comment Share on other sites More sharing options...
gr4devel Posted August 29, 2013 Author Share Posted August 29, 2013 Found it! The problem was the order process type. I had selected the 5 steps and not the one page checkout. However there must be some more explanation in the BO concerning this stuff Thanks again vekia! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now