Download the PHP package gewebe/sylius-vat-plugin without Composer
On this page you can find all versions of the php package gewebe/sylius-vat-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gewebe/sylius-vat-plugin
More information about gewebe/sylius-vat-plugin
Files in gewebe/sylius-vat-plugin
Package sylius-vat-plugin
Short Description VAT number address field with validation, EU VAT rates plugin for Sylius
License MIT
Informations about the package sylius-vat-plugin
Sylius VAT number and rates plugin
Features
- Installer for EU VAT rates with countries and zones
- New fields for VAT number at
Address
andShopBillingData
entity - Configure VAT number field requirement:
- Optional / Required
- Required if customer filled “Company” field
- Required in selected countries
- Validate VAT number:
- Format for selected country
- Country is same as selected country
- Validity using VIES API for EU VAT number
- Revalidate customers VAT numbers after a given time
- Placing an order without VAT in the EU, if
- VAT number validation was successful
- Customers taxation country is different from shop billing country
Installation
Download the plugin via composer
Enable the plugin in bundles.php
Import the plugin configurations
Configure taxation address
For EU VAT, the address for taxation should be set to the shipping address in the Sylius configuration.
Copy templates
Copy customized templates to your templates directory (e.g templates/bundles/
):
Extend Address
entity
If you use yaml
mapping add also:
Add or Extend ShopBillingData
entity
If you use yaml
mapping add also:
Override the resource for shop_billing_data
in your sylius config:
Update your database schema
Usage
Install EU countries and VAT rates
Validate customers VAT number
1. Create new order with VAT number at shipping address
2. Show VAT number and validation status at admin orders
Testing
Traditional
- From the plugin root directory, run the following commands:
To be able to set up a plugin's database, remember to configure your database credentials in tests/Application/.env
and tests/Application/.env.test
.
-
Run your local server:
- Open your browser and navigate to
https://localhost:8000
.
Docker
-
Execute
make init
to initialize the container and install the dependencies. -
Execute
make database-init
to create the database and run migrations. -
(Optional) Execute
make load-fixtures
to load the fixtures. - Your app is available at
http://localhost
.
Running plugin tests
-
PHPUnit
-
PHPSpec
- Behat (non-JS scenarios)
-
PHPStan - Static Analysis
- Coding Standard
All versions of sylius-vat-plugin with dependencies
ext-soap Version *
ibericode/vat Version ^2.0
sylius/sylius Version ~2.0.0