Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

VAT settings

This part of the 4.x documentation is for eZ Publish 4.0, only reference section is common for all eZ Publish 4.x versions as well as eZ Publish 5.x "LegacyStack", please select the version you are using for the most up to date documentation!

The "[VATSettings]" section of the "settings/shop.ini" configuration file defines the VAT handler that will be used for assigning the value added taxes to your products. Under this section, the following settings can be specified:

  • The "Handler" setting specifies the VAT handler that will be used.
  • The "RepositoryDirectories[]" array specifies the directories where eZ Publish will search for built-in VAT handlers.
  • The "ExtensionDirectories[]" array specifies the extension directories where eZ Publish will search for additional VAT handlers. By default eZ publish will search in the "vathandlers" subdirectory inside your extension.
  • The "UserCountryAttribute" setting specifies the identifier of the user country content attribute.
  • The "ProductCategoryAttribute" setting specifies the identifier of the product category content attribute.
  • The "RequireUserCountry" setting is set to true by default so that the system will always require a user country. If set to false, no error messages will be displayed in case if user country is not specified.
  • The "DynamicVatTypeName" setting specifies how the system will display the name of the dynamic VAT type. This alternative is called "Determined by VAT charging rules" by default. You can specify for example "Dynamic VAT", "Country dependent VAT", "Extended VAT" or "My own VAT" in this setting. The system will use this name for the last item in the drop-down list of VAT types located in the class/object view and edit interfaces.

Example 1

The following lines can be specified under the "[VATSettings]" section of the "shop.ini" configuration file:

[VATSettings]
Handler=ezdefault
RepositoryDirectories[]=kernel/classes/vathandlers

These settings will instruct eZ publish to use the built-in update handler located at "kernel/classes/vathandlers/ezdefaultvathandler.php".

Example 2

You can extend the system by creating custom VAT handlers for special needs. For example, if you have an extension "myextension" that includes a VAT handler "myrule", you can put the following lines into an override for the "shop.ini" configuration file:

[VATSettings]
Handler=myrule
ExtensionDirectories[]=myextension

or

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

These settings will instruct eZ Publish to use the VAT handler located at "extension/myextension/vathandlers/myrulevathandler.php".

Svitlana Shatokhina (11/05/2006 12:52 pm)

Ricardo Correia (17/04/2013 2:39 pm)

Svitlana Shatokhina, Geir Arne Waaler, Ricardo Correia


Comments

There are no comments.