A customer wrote today saying they couldn't order because their phone number was being rejected as invalid.
I followed the instruction here https://www.prestashop.com/forums/topic/393876-how-disable-phone-number-format-check/
and did this:
Find in classes/Validate.php
public static function isPhoneNumber($number)
{
return preg_match('/^[+0-9. ()-]*$/', $number);
}
and change to:
public static function isPhoneNumber($number)
{
return true;
}
I'm wondering what the customer might have entered that gave the error. Do I read the original code properly that it demands a plus? If so, it might be a good idea to change that. I'm sure this affects lots of customers.
Question
30knees
A customer wrote today saying they couldn't order because their phone number was being rejected as invalid.
I followed the instruction here https://www.prestashop.com/forums/topic/393876-how-disable-phone-number-format-check/
and did this:
Find in classes/Validate.php
public static function isPhoneNumber($number) { return preg_match('/^[+0-9. ()-]*$/', $number); }
and change to:public static function isPhoneNumber($number) { return true; }
I'm wondering what the customer might have entered that gave the error. Do I read the original code properly that it demands a plus? If so, it might be a good idea to change that. I'm sure this affects lots of customers.12 answers to this question
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