Steps to reproduce the issue.
1. Add an EU-VAT app to a country, eg: Spain
2. Go to the front-end on the checkout page
3. Select Spain in the Country dropdown
4. Enter a VAT ID BUT do not fill in the Company Name field (That field is supposed to be optional and can be ignored by the user)
[/list]
Actual Behavior
The VAT ID is not get validated as a Business and no validation error is shown because the Company Name is left blank. The user doesn't know that and can result in frustration.
Expected Behavior
The VAT ID should be validated as a Business and the validation error "VAT No. is invalid or not-registered" should be shown if the VAT ID is invalid without taking into account the Company Name field. The VIES Server requires only the VAT-ID to determine whether it's valid or not.
Fix
Update the com_payplans/themes/wireframe/checkout/default/company.js file on line 94 and replace the following
with
I am aware that I can fix this by overriding the company.js script in my template but I think it's a rather important issue that needs to be fixed in the core.
1. Add an EU-VAT app to a country, eg: Spain
2. Go to the front-end on the checkout page
3. Select Spain in the Country dropdown
4. Enter a VAT ID BUT do not fill in the Company Name field (That field is supposed to be optional and can be ignored by the user)
[/list]
Actual Behavior
The VAT ID is not get validated as a Business and no validation error is shown because the Company Name is left blank. The user doesn't know that and can result in frustration.
Expected Behavior
The VAT ID should be validated as a Business and the validation error "VAT No. is invalid or not-registered" should be shown if the VAT ID is invalid without taking into account the Company Name field. The VIES Server requires only the VAT-ID to determine whether it's valid or not.
Fix
Update the com_payplans/themes/wireframe/checkout/default/company.js file on line 94 and replace the following
if ($('[data-pp-company-bizname]').val() && $('[data-pp-company-vatno]').val()) {
with
if ($('[data-pp-company-vatno]').val()) {
I am aware that I can fix this by overriding the company.js script in my template but I think it's a rather important issue that needs to be fixed in the core.