Jump to content

[SOLVED] PS 1.5.4.1 required phone number not really required


gr4devel
 Share

Recommended Posts

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 by gr4devel (see edit history)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 by gr4devel (see edit history)

Share this post


Link to post
Share on other sites

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 by gr4devel (see edit history)

Share this post


Link to post
Share on other sites

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 :)!

Share this post


Link to post
Share on other sites

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! :D

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More