VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: tuaneric on January 05, 2023, 14:36:24 PM

Title: Force phone and mobile format ?
Post by: tuaneric on January 05, 2023, 14:36:24 PM
Hello

I bought VP One Page Checkout Plugin for virtuemart 4.

I'm looking for a plugin to force phone format 00 00 00 00 00 in new account registration and billing details in cart.
I found Phone Number Validator but it is no longer for sale.

https://alatak.net/en/userfields-for-virtuemart/phone-number-validator.html

Do you know any other extension or plugin ?

Thank
Title: Re: Force phone and mobile format ?
Post by: pinochico on January 05, 2023, 18:37:27 PM
you can use this:
https://github.com/jackocnr/intl-tel-input

custom implementation with geoip (replace https://ipinfo.io with other function (etc. geolocator) or not.

You can see on this:
https://www.cannadorra.com/en/eshop/cart

But is not 100%perfect :)
Title: Re: Force phone and mobile format ?
Post by: tuaneric on January 09, 2023, 14:53:33 PM
Hello Pinochico

Thank you for your info, I just want to have the phone format: 00 00 00 00 00 to adapt with the phone in France.

Is it possible to modify the Joomla PHP template or pages to have it in phone format ?

I used Hera template, I enabled custom.js to add the JavaScript code

Thanks
Title: Re: Force phone and mobile format ?
Post by: GJC Web Design on January 09, 2023, 15:17:48 PM
https://stackoverflow.com/questions/72627663/format-phone-number-in-javascript
Title: Re: Force phone and mobile format ?
Post by: tuaneric on January 26, 2023, 14:47:06 PM
Hello GJC Web Design

I don't know the PHP and Java code, you can give me the code to add in the php pages of joomla and virtuemart.

i just want phone and mobile phone format 00 00 00 00 00

Thanks