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
- 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 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
- Select Extensions form the main horizontal menu in Joomla
- Select the submenu Manage
- Select Upload Package File tab
- Select the package to upload
- Click on upload
What does the plugin during installation?
- It enables the plugin
- 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
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 ...
... 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
Is the expected phone number a i or a fixed number. It is used to set the correct placeholder in the form.
Phone validator plugin parameters
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 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 is saved in national or international mode
In the administration, both international and national numbers are displayed.
Phone validator in the VirtueMart administration
Select the countries that will be on the top of the list
Phone validator Preferred countries
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
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
- 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?