Skip to the content
Documentation

VAT settings

No ratings yet

The VAT handler and the attributes it reads are set in settings/shop.ini, group [VATSettings]. Put your values in settings/override/shop.ini.append.php, or in an extension's settings/shop.ini.append.php.

Setting Shipped value Meaning
Handler not set The VAT handler. ezdefault is the built-in one. A value xyz loads the class xyzVATHandler (case does not matter) from the file xyzvathandler.php. Without a handler there is no dynamic VAT type.
RepositoryDirectories[] kernel/classes/vathandlers Directories handlers are looked up in
ExtensionDirectories[] empty Extensions whose vathandlers/ directory is searched too
UserCountryAttribute empty The identifier of the Country attribute of the user class (User country)
ProductCategoryAttribute empty The identifier of the Product category attribute of the product classes (Product category)
RequireUserCountry true false: no error when the customer's country is not known; for handlers that do not need it
DynamicVatTypeName Determined by VAT charging rules The name of the dynamic VAT type in the edit forms

Example: the built-in handler

[VATSettings]
Handler=ezdefault
UserCountryAttribute=country
ProductCategoryAttribute=category

Example: a handler of an extension

For the handler myrule, in the file myrulevathandler.php in the vathandlers/ directory of the extension myextension, either of these works:

[VATSettings]
Handler=myrule
ExtensionDirectories[]=myextension
[VATSettings]
Handler=myrule
RepositoryDirectories[]=extension/myextension/vathandlers

Clear the INI caches after a change. Every setting is also described in the settings of shop.ini.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.