Convert Customer Phone Number

Ilhamadli
New Member
1 0 0

Hi guys,

I want to convert the Phone Number that the customer fills in for Contact Information and Shipping Address.

The reason for this was our admin want the customer's phone number with "62" as the first number.

Our customer often to fills their Phone Number with these kind formats:

  • 081122334455
  • 0811 2233 4455
  • +6281122334455

What I want to do is, Convert the first number or char or remove the space.

ex: 

  • 081122334455 to 6281122334455 (the first number "0" replaced by "62").
  • 0811 2233 4455 to 6281122334455 (the first number "0" replaced by "62" and space is removed). 
  • +6281122334455 to 6281122334455 (the first char "+" will be removed).

What's the best solution to this? I appreciate any help or suggestion.

Thank you

0 Likes