Enable VAT ID validation with country codes (for Austria: ATUXXXXXXXX) as usual in EU.
OverviewBack to top
This extension for Magento 2 changes the behavior of VAT ID validation in Magento thus validating VATs with including VAT country code is possible. Magento concatenates the ISO-Country Code (e.g. GR for Greece) and the entered VAT (e.g. 12345678) and sends this data to the Validation Service. So the total VAT number would be GR12345678. If you enter a valid VAT ID (e.g. EL12345678) with an including country code Magento creates the following VAT: GREL12345678 which is not a valid VAT number.
With this extension it is possible to enter a valid VAT ID including a country code (e.g. EL12345678) and this is passed to the validation service. If no country code in the VAT ID is detected then validation is performed in the same way as Magento does.
- VAT ID validation containing country codes
- Valid validation for Greece (ISO: GR, VAT: EL) and Great Britain (ISO: GB, VAT: UK)
- Fix to use automatic customer group assignment for the mentioned countries
- Works with the VIES validation service
- No additional settings or third party services needed
When do I need this?
- Magento2 can change a customers group regarding to a valid VAT ID. This feature is especially useful for companies within the EU.
- There is a small issue in Magento2 (also Magento1) thus it is not possible to correctly validate a VAT ID where the country code is in it.
- In Europe the VAT consists of 2 letters that represent the country and additional letters for the company identification.
- This plugin changes the behavior how Magento validates the VAT ID so a full VAT ID can be entered.
- With this plugin it is possible to validate a VAT ID even for countries like Greece (ISO: GR, VAT: EL) or the United Kingdom (ISO: GB, VAT: UK) where the declarations collide.
When a customer enters a VAT number and save the data this plugin takes the following steps
- The plugin takes the given string
- Validate the country code if it is a valid EU country code defined in ISO-3166-Alpha-2-Code
- If it is valid, it changes the parameter for original method of Magento
- Magento sends the validation-request to the VIES-Service and the normal workflow of Magento is executed
This extension is a plugin, it will work out of the box when it is installed correctly.
There are no settings in the backend.
Release NotesBack to top
- Compatible with Open Source (CE) : 2.0 2.1 2.2 2.3
- Stability: Stable Build
Added Support for Magento 2.3
- Compatible with Open Source (CE) : 2.0 2.1 2.2
- Stability: Stable Build
This extension for Magento2 changes the behaviour of VAT validation in Magento.
With this extension installed it allows the Magento2 to accept VAT (UID) with prepended countrycodes (ex. **AT**U69932326)for all european countries.
For all other countries the check stays the same. It uses the original VIES Service to validate the given VAT / UID.