x 
Cart - 0,00 €
Cart
Cart empty

Phone Number Validator

alatak phonevalidator logo

Phone Number Validator  is a userfield plugin for VirtueMart allowing your client to validate the fix or mobile phone while registrating, and you to validate fix or mobile phone given by the shopper.

Get the plugin  Demo VM3

Features

  • Navigate the country dropdown by typing a country's name, or using up/down keys
  • Selecting a country from the dropdown will update the dial code in the input
  • Automatically format the number as the shopper enters a phone number
  • Automatically set the input placeholder to an example number for the selected country
  • Typing a different dial code will automatically update the displayed flag
  • Parsing/formatting/validating phone numbers for all countries/regions of the world.
  • Able to distinguish Fixed-line, Mobile phones whenever it is possible
  • Works with all the countries in the world.
  • Easy customization of the default country code
  • Formatting Phone Numbers 'as you type'
  • Automatically detects international and national phone numbers and save the phones in the correct format. 
  • All previous data is preserved during install and uninstall scripts
phone validator example
Phone Validator helps the user to enter and save the phones in the correct format

Installation of the plugin Phone Number Validator

Install the plugin via the joomla installer

  1. Select Extensions form the main horizontal menu in Joomla
  2. Select the submenu Manage
  3. Select Upload Package File tab
  4. Select the package to upload
  5. Click on upload

What does the plugin during installation?

  1. It enables the plugin
  2. If it finds phone_1 or phone_2 as shopper fields in VirtueMart, it replaces the type input text by the type plugin alatak_phonevalidator
alatak phone validator install
Installation message after installing the phone validator plugin

As mentioned in the warning message, you must now set up the configuration of the shopper field.

Default phone fields installed by VirtueMart
Default phone fields installed by VirtueMart ...

Default phone fields installed by VirtueMart
... are automatically replaced by the Phone validator plugin. No data is lost!

Phone Number Validator Configuration in VirtueMart

Create the shopper fields in VirtueMart

If you do not have the shopper fields phone_1 and phone_2, you will have to create them.

In VirtueMart, on the left menu select Configuration, and then Shopper Fields.
VirtueMart when installing creates all the required shopper fields necessary for the checkout.

  • Unpublish or delete the default shopper fields for phones (phone_1 and phone_2)
  • Click on New on that page
  • In the dropdown called Field Type, select Phone Number Validator
  • For the Field name, a meanningfull name
  • For the Field title, you can add the same key as the one used by VirtueMart. Example
    • COM_VIRTUEMART_SHOPPER_FORM_PHONE for the fixed line phone
    • COM_VIRTUEMART_SHOPPER_FORM_PHONE2 for the mobile phone

Configure the shopper Fields

Number Type

Is the expected phone number a i or a fixed number. It is used to set the correct placeholder in the form.

Phone validator extra plugin parameters
Phone validator plugin parameters

Local Country

Select the country used to store the phone number as a national number. In most of the case, it should be the same country as the vendor.
In the Add/Edit Billing or shipping address view, for a better user experience, the phone number is always displayed in the national mode near by the flag.

Phone validator in the Bill To address
Phone validator plugin in the Bill To address

In the cart View, the phone number is saved in the national mode for the country set in the Local Country parameter, and in international mode for all the others numbers.

 

Phone validator in the cart
Phone is saved in national or international mode

In the administration, both international and national numbers are displayed.

Phone validator in the VirtueMart administration
Phone validator in the VirtueMart administration

Preferred Countries

Select the countries that will be on the top of the list

Phone validator Preferred countries
Phone validator Preferred countries

VirtueMart parameters

At the bottom of that page, check that you have set the VirtueMart parameters for shopper fields like this:

  • Required: as you wish
  • Show in cart form: No
  • Show in account maintenance: Yes
  • Show in shipment form : Yes
  • Read-Only: No
  • Published: Yes
VirtueMart's configuration parameters for Phone validator
VirtueMart's configuration parameters for Phone validator

Credits

The Phone Number Validator uses the libphonenumber library from Google to validate phone numbers, and https://github.com/jackocnr/intl-tel-input scripts.

License, Support and Update

The Phone Number Validator plugin is available under the GNU / GPL. The license is valid for 1 year from the date of purchase.

If problems arise with Phone Number Validator plugin, here is a list of action to take yourself:

  • Make sure you have the latest version of the plugin
  • Make sure you do not have javascript errors in the browser console that may be due to third-party extensions
  • If you use 3rd party System One Page Checkout plugin, disable it, and repeat tests
  • Test with the default template provided by Joomla

If your problem persists, create a ticket : specify Joomla and VirtueMart versions, and describe your problem in detail. You can attach screenshots.

If the bug is proved, it will be corrected soon. You will be notified via the Joomla update. Then go to your account and download the latest version of the plugin.

How to update

    • Install the plugin via the joomla installer. It is automatically updated.
    • It is a good habit to go to the userfield configuration, and check if there are some new parameters, and save the plugin.

How to uninstall the plugin?

 

Change log

  • version 1.0.0 :
    • initial version
alatak·net
Agence Web
Expert Joomla
Basé sur Sophia Antipolis
Spécialisée dans le développement web
alatak.net, Joomla Certified Administrator

© alatak·net, tous droits réservés.
Le site alatak.net n'est ni affilié à Open Source Matters ou au projet Joomla ni approuvé par eux. Le nom Joomla!® est utilisé sous license limitée de Open Source Matters, le propriétaire mondial de la marque de commerce.