koeketienedesign / vat-checker
Validates and returns company info of VAT Number in Europe
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
Requires (Dev)
- codeception/codeception: ^3.0
- craftcms/cms: ^3.2.0
- vlucas/phpdotenv: ^3.0
This package is auto-updated.
Last update: 2025-03-24 08:20:00 UTC
README
Validates and returns company info of VAT Number in Europe
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require koeketienedesign/vat-checker
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for VAT Checker.
VAT Checker Overview
Custom field to use in craft to get a valid European VAT number. You can use this also in twig if you want to hardcode a value. You can also receive the company info from the VAT in the twig filter.
Using VAT Checker
Custom field
Create a new field by selecting VAT Field on the dropdown. No need to add extra info
Twig filter
You can use the |vat
filter to validate a VAT number. If you want company info add info
as param to the function
{{ entry.vatField|vat }} {# Output: 1|0 --> depending on if it's valid or not #} {{ entry.vatField|vat('info') }} {# Output: " object(stdClass)[1591] public 'valid' => boolean true public 'countryCode' => string 'BE' (length=2) public 'vatNumber' => string '0688696733' (length=10) public 'name' => string 'BVBA KOEKETIENE DESIGN' (length=22) public 'address' => object(stdClass)[1598] public 'street' => string 'Kanunnikenstraat(mar)' (length=21) public 'number' => string '8' (length=1) public 'zip_code' => string '8510' (length=4) public 'city' => string 'Kortrijk' (length=8) public 'country' => string 'België' (length=7) public 'countryCode' => string 'BE' (length=2) public 'strAddress' => string 'Kanunnikenstraat(Mar) 8 8510 Kortrijk' (length=37) " #}
VAT Checker Roadmap
None at this moment. All suggestions are welcome
Brought to you by Stefanie Gevaert