Download the PHP package flux-se/sylius-eu-vat-plugin without Composer
On this page you can find all versions of the php package flux-se/sylius-eu-vat-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flux-se/sylius-eu-vat-plugin
More information about flux-se/sylius-eu-vat-plugin
Files in flux-se/sylius-eu-vat-plugin
Package sylius-eu-vat-plugin
Short Description Add EU VAT field and validation for Sylius using VIES API Webservice.
License MIT
Informations about the package sylius-eu-vat-plugin
EU VAT field and validation for Sylius using VIES API Webservice
This plugin is adding :
- two new attributes to the
Channel
entity allowing to know from which country your shop is from and what's the European zone to target - VAT Number field to the
Address
entity - validation over VIES API on this field
- validation of the address country (vat number country should equal to the address country)
- the basic European rule allowing the seller not to charge
VAT to foreign European customers who have provided a valid VAT number :
- (Shop country === customer country vat number) then do nothing
- (Shop country !== customer country vat number) then remove taxes
Screenshots
Shop checkout
Shop account
Installation
Configuration
Enable this plugin :
Add default config if you want to get access to the default fixtures this plugin need.
Update Channel
entity : src/Entity/Channel/Channel.php
And the corresponding interface : src/Entity/Channel/ChannelInterface.php
Click me : if you are using YAML ORM definitions
Then change the default Sylius model class :
Update Address
entity : src/Entity/Addressing/Address.php
And the corresponding interface : src/Entity/Addressing/AddressInterface.php
Click me : if you are using YAML ORM definitions
Then change the default Sylius model class :
Update your database :
Load some required fixtures :
`
Go to your admin panel and edit your Channel
to set the two fields to indicate to this plugin :
- What is your base country to compare to your customer country.
- What is the European zone to know if the customer is part of the Europe or not.
Fixtures
You can add some fixtures to auto-configure your channel, for example add this into a yaml file :