Version 3.2.0 by lat9 and webchills. Copyright © 2017-2024, Vinos de Frutas Tropicales.
Current Support Thread on the Zen Cart forums: https://www.zen-cart.com/showthread.php?223003-VAT4EU-Support-Thread
Usage Notes:
SOAP
service is enabled in your site's PHP. To check, navigate to your Zen Cart admin's Tools :: Server/Version Info and search that page for Soap Client
. If that setting is not found or is not set to enabled, then the VIES service cannot be used.admin/customers.php
to include these updates that were applied after v1.5.8a's release. Without those changes, you will not be able to successfully update a customer's record if the VAT Number was found to be invalid!includes/classes/Customer.php
to include this change; otherwise, a customer's entered VAT Number won't be added to various pages' formatted-address(es) displays.includes/functions/functions_addresses.php
, to include this change; otherwise, formatted addresses that should contain a VAT Number might not.VAT for EU Countries (VAT4EU) updates your store to gather, display and validate an EU "VAT Number". Once the plugin is installed, configured and enabled on your store:
Note: This plugin is derived from the similarly-named plugin VAT-mod for European companies, but its processing is quite different!
This section identifies the processes you'll use to install VAT for EU Countries or uninstall VAT4EU entirely.
There are template-overrides required by this plugin; you should always backup your cart's database and files prior to making any changes. All template-overrides use the like-named files in the Zen Cart 1.5.8a distribution as their change-basis. Template-file changes are based on those present in that release's template_default
directories.
Unzip the plugin's package file and then:
responsive_classic
or template_default
templates:Notes:
bootstrap
possibly renamed in step C, above.YOUR_TEMPLATE
possibly renamed in step B, above.First, delete the files that were copied to your Zen Cart's file-system during the installation process, then copy the contents of the plugin's /docs/vat4eu/uninstall/uninstall_vat4eu.sql
to your clipboard and paste into your admin's Tools :: Install SQL Patches to complete the uninstall process.
Once you've performed the initial Installation steps, a new configuration group is available in your admin's menu: Configuration :: VAT for EU Countries. The following settings are provided:
Setting Name | Description | Default |
---|---|---|
Plugin Version and Release Date | Displays the plugin's currently installed version and release date. | Varies |
European Union Countries List | Contains a comma-separated list of the ISO-code-2 values, e.g. DE for Germany, of the countries currently in the European Union — with intervening blanks allowed. The list is updateable since countries can move in and out of the EU! Note: Versions of VAT4EU prior to v2.0.4 improperly used the country code EL in this setting instead of the correct GR for Greece. On installation of v2.0.4 or later, any reference to EL will be automatically changed to GR … unless the GR country-code is already present in this setting. |
AT,BE,BG,CY,CZ,DE, DK,EE,GR,ES,FI,FR, GB,HR,HU,IE,IT,LT, LU,LV,MT,NL,PL, PT,RO,SE,SI,SK |
Enable storefront processing? | The VAT4EU processing is enabled when this setting is "true" and you have also set Configuration :: Customer Details :: Company to true. | false |
VAT Number required? | Identify whether (true) or not (false) customers' addresses in your store require a VAT Number entry. | false |
Minimum VAT Number Length | Identify the minimum length of an entered VAT Number, used as a pre-check for any input value. Set the value to 0 to disable this check. The "VIES" validation service will be the final arbitrator of the number's validity! | 10 |
Enable VAT Refund for in-country purchasers? | Identify whether or not billing addresses within your store's country with a validated VAT Number qualify for a VAT refund. | false |
VAT Number Validation | Identify the method to use when validating a VAT Number, either:
|
Admin |
VAT Number: Unvalidated Indicator | Identify the character(s) to be appended to any VAT Number display when that number has not been validated and, thus, cannot be used to receive any VAT Refund. | * |
Enable debug? | Choose whether the plugin's debug is enabled. When enabled, each:
|
false |
VAT4EU provides two (2) order-total modules that activate when an order qualifies for a VAT Refund; use your admin's Modules :: Order Total tool to "Install" each of these modules:
ot_tax
for proper operation.ot_total
for proper operation.The image illustrates a sample order-total block for an order that qualifies the purchaser for a VAT Refund, essentially backing-out any tax-related charges for the order and adding the "reverse charge" disclaimer.
The following configuration settings are also required for full VAT4EU customization:
If you haven't already set up the taxes for your store, now is the time!.
Note: I am neither an accountant nor a tax attorney; the configuration suggested here is, I believe, the minimum required for the EU MOSS Scheme. Please consult your tax authority for verification!
First, you'll need to configure your store's base settings using your admin's Configuration :: My Store:
Next, you'll define the taxable "zones" to be used for your store, using your admin's Locations / Taxes :: Zone Definitions tool. This section identifies the minimum requirements for this setup, assuming that you will be charging the same VAT rate for all taxable products shipped within the European Union, including your store's country.
This section identifies the visual changes made to your store (both admin and storefront) once the VAT4EU plugin is installed and configured.
VAT4EU integrates with your admin's Customers :: Customers listing display, identifying which customers have supplied a VAT Number and the validation-status of each. Clicking on the Asc or Desc links for the "VAT Number" column sorts the display based on the status of the associated VAT Number.
When sorted in Asc order, the customer records are displayed in the following status-order:
When you click on the "Edit" button associated with a customer, the information-gathering page now includes fields where you can enter (or correct) a customer's VAT Number entry. If that VAT Number can't be automatically verified by the VIES service, there's a VAT Validation Override checkbox; ticking that box will allow the customer to create an order that qualifies for a VAT refund.
VAT4EU also updates your admin's Customers :: Orders display (as well as the display for any Invoice or Packing-slip) to include the VAT Number associated with the billing address for the order.
When a customer places an order with a validated VAT Number, VAT4EU's order-total modules update the order's "order-total" block to identify that the VAT has been removed from the order and includes a "reverse charge" disclaimer. This change is visible both in the storefront and the admin post-order displays.
When VAT4EU is installed, the address-entry form on the following pages is modified, inserting the VAT Number field following the Company Name field as shown in the sample image.
The What's this? link, when clicked, displays a popup window that illustrates the varied VAT formats for the EU countries. That information is a re-formatted version of the information on the VIES website, and is current as of 2024-03-03. The content is provided by /includes/languages/english/html_includes/define_popup_vat4eu_formats.php
.
Note: The VAT Number input will be added only if you have set Configuration :: Customer Details :: Company to true!
Each customer address-block in the storefront display is also modified, adding any VAT Number associated with a customer's billing address. The sample image shows this rendering for the checkout_confirmation
page. The following Zen Cart pages are included in this processing:
VAT4EU integrates with Edit Orders, version 4.7.0 or later. That version of EO provides additional notifiers that allow VAT4EU's operations and supports zc158+ installations. You'll need to install EO separately.
If you have additional plugins installed that also "want to" include the VAT Number display in an address block, VAT4EU has you covered! Both the storefront and admin processing issue a notification when a zen_address_format
function call is made on a page that isn't in the VAT4EU built-in processing. An observer-class module can "attach" to that notifier and indicate (by setting the 3rd parameter to (boolean)true to indicate that the VAT Number should be included in that address block.
$this->notify('NOTIFY_VAT4EU_ADDRESS_DEFAULT', $address_elements, $current_address, $show_vat_number);
You can view the details of these changes on the plugin's GitHub repository.
create_account_success
page.zen_cfg_read_only
so that the plugin's version/release date don't get updated on a configuration update.zc156b
as the non-template overwrites are now 'baked into' that release.zen_html_quotes
.