Jump to content

Formating Phone number without blank space


kimy

Recommended Posts

Hi!

My payment module adds the customers phone-number in a format with blank spaces in between, like: 0735 12 23 45.

My other modules needs to have the number in this format: 0735122345

Can i somehow make changes in prestashops code in order to achieve this?

I'm using Prestashop 1.7.2.4

I'm not sure but this line of code may do the trick,

$string = preg_replace('/\s+/','',$string);

Maybe you can help me from here?

 

Link to comment
Share on other sites

  • 2 weeks later...
On 2/13/2018 at 9:34 AM, kimy said:

Hi!

My payment module adds the customers phone-number in a format with blank spaces in between, like: 0735 12 23 45.

My other modules needs to have the number in this format: 0735122345

Can i somehow make changes in prestashops code in order to achieve this?

I'm using Prestashop 1.7.2.4

I'm not sure but this line of code may do the trick,


$string = preg_replace('/\s+/','',$string);

Maybe you can help me from here?

 

Hello, I have the same issue, did you found any solution?

Link to comment
Share on other sites

  • 2 months later...
  • 3 years later...

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
×
×
  • Create New...