magento:euvat:installation

Installation, Upgrade, Uninstall & Release Notes

We have choosen the manual approach for installation of this Magento Extension, to give everyone also the freedom to look inside of the package before installation. Also if the extensions is active in a production environment, any automated update may interfere with the store functionality.

  • Magento 1.3 or higher (or Magento 2.1) depending on the purchaed Software License and all prerequisites coming with it.
  • Your Magento installation is required to be faultless and fully functional.
  • We strongly recommend to perform the first install on a non-productive system, to perform your settings and any customizations there first. And then to install the extension on your production system with transfering your settings and customization.

  • If your server is using a firewall, or is located behind a firewall: Configure your firewall to allow outgoing connections to
    http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
    and http://ec.europa.eu/taxation_customs/vies/services/checkVatService
  • EuVAT requires the PHP-SOAP Extension. To check if the SOAP Extension is installed and active on your PHP installation use the phpinfo() command in a script to show the overview of your PHP installation (and run the script from your browser). Look for a section SOAP as shown below, if that one is missing your server is required to have php-soap installed:

phpinfo.php

<?php
phpinfo();
?>



If your server has IPv4 and IPv6 installed and configured (dual-stack) then the PHP-SOAP extension that is used by EuVAT to connect to the EU VIES service may have difficulties to connect to the EU VIES service as the EU VIES service tries to respond back via IPv6 first.

If you receive the following message We are currently unable to connect to the related EU VIES service. Please try again later. this may indicate that the webserver which houses your Magento Store may have IPv4 and IPv6 network communication active in parallel.


The EU VIES service does accept IPv6 connections, but does only respond back through IPv4 thus outgoing validation requests sent via IPv6 will not resolve.

Solution Approaches
  • Deactivate the IPv6 stack on your server.
  • Or configure the network such to have the connection preference on IPv4 over IPv6 adding in etc/hosts to force use of the IPv4 address of the EU VIES service (Note: If the IP-Address changes you need to update this entry) as shown below:

etc/hosts

147.67.136.103 ec.europa.eu # if IP changes, this requires update



You may need to correct the above shown IP-Address for ec.europa.eu in case DNS changes have been performed by the EU VIES services. To lookup the current IP-Addresses of ec.europa.eu click here...

  1. Take your Magento Shop offline in case you are installing on your Production System. In case during installation your Magento Store is activated the EuVat installation may become incomplete and error messages or malfunctions may result.

  2. Unpack the contents of the package and copy the content into the home directory of your Magento installation on your server:
    The Installation Package contains a directory structure that already holdes the individual files correct positions, and that is relative to the Magento Store's home directory (or installation path) on your server.
    If your Magento Store is installed in /home/www/magento then your home directory is to show a app subdirectory (as in the installation package).
    Extract the content of the Archive (or upload its content) into the home directory of your Magento Store, the head subdirectories of the Installation Package shall match the subdirectory structure of the home directory (as a check).

  3. If you are using Caching in your Magento Store, login into your Magento Administration and refresh your Cache: System » Cache Management » All Cache » Refresh.
  4. Read through here for the initial configuration of your Magento Store to work with EuVat.



  • Enable the Maintenance Mode of your Magento Store using the Magento CLI command: magento maintenance:enable
  • Upload the content of the installation package to the home directory of your Magento Store
  • If having a fresh installation enable the extension using the Magento CLI command: magento module:enable Pisc_Euvat
  • Verify that the extension is now enabled using the Magento CLI command: magento module:status - The resulting list should show: Pisc_Euvat
  • To install the extensions database schema and data resources (or when having uploaded a newer release and to do an update of these) use the Magento CLI command: magento setup:upgrade
  • Flush all Magento Caches using the Magento CLI command: magento cache:flush
  • Update the Dependency Injection configuration using the Magento CLI command: magento setup:di:compile
  • Disable the Maintenance Mode of your Magento Store using the Magento CLI command: magento maintenance:disable



  1. Take your Magento Shop offline in case you are upgrading your Production System. In case during upgrade your Magento Store is activated the EuVat upgrade may become incomplete and error messages or malfunctions may result.

  2. Backup your Magento installation, or at least backup the folder app/code/local/Pisc/Euvat for saving any current installed version of EuVat.
  3. Delete the folder app/code/local/Pisc/Euvat to ensure correct updating of store resources required by the extension.
  4. Unpack the contents of the package and upload the content into the home directory of your Magento installation on your server.
  5. Alternatively you may just unpack the files in app/code/local/Pisc/Euvat and app/etc/modules for the main extension files, and update any template related files later manually.
  6. If you are using Caching in your Magento Store, login into your Magento Administration and refresh your Cache: System » Cache Management » All Cache » Refresh.


Reinstalling the Extension

In case our Technical Team recommends to “Reinstall” the extension perform as followed, or when during the original installation (or a update) on your store some particular installation step did not fully apply to your store installation:

  1. You may want to take your Store offline, be aware that removing EuVat from a Store in operation may generate errors.
  2. Disable your Stores Cache using the Administrator and System » Cache Management » All Cache » Disable
  3. Logoff from the Administrator Backend of your Magento Store.
  4. Open your Magento Database using a MySQL Database Frontend (like PhpMyAdmin) and remove the Version entry for EuVat in the Magento Database by opening the table core_resource and removing the row entry for euvat_setup.
    This table name may carry the table prefix defined for your Magento installation.
  5. Logon to the Administrator Backend of your Magento Store.
  6. Enable or Update your Stores Cache using the Administrator and System » Cache Management » All Cache » Enable or Refresh



Follow the same steps as for installation of the extension (see above).

To uninstall EuVat from your Store follow this procedure:

  1. You may want to take your Store offline, be aware that removing EuVat from a Store in operation may generate errors.
  2. Remove the extension definition file /app/etc/modules/Pisc_Euvat.xml
  3. Update your Stores Cache using the Administrator and System » Cache Management » All Cache » Refresh
  4. Remove the directory app/code/local/Pisc/Euvat
  5. Open your Magento Database using a MySQL Database Frontend (like PhpMyAdmin) and remove the following database tables: euvat_vies_cache, euvat_customer_exclude.
    These table names may carry the table prefix defined for your Magento installation.
  6. Remove the Version entry for EuVat in the Magento Database by opening the table core_resource and removing the row entry for euvat_setup.
    This table name may carry the table prefix defined for your Magento installation.
  7. Remove the related layout file from your Frontend template directory in app/design/frontend/…/layout/euvat.xml.
  8. Remove the related templates from your Frontend template directory in app/design/frontend/…/template/euvat.
  9. Remove the related layout file from your Administrator template directory in app/design/adminhtml/…/layout/euvat.xml.
  10. Remove the related templates from your Administrator template directory in app/design/adminhtml/…/template/euvat.
  11. If having modified your template files to include the EuVAT Tax/VAT entry field or the EuVAT Status messages, remove these customizations from your template files.
  12. In the database table eav_attribute search for source_model=“euvat/tax_attribute_source_class” and replace it with source_model=“tax/class_source_customer”



If a removal of all configuration data (except for the tax rates, tax rules, tax groups, customer groups which need to get removed manually using the store administrator):

  1. Remove the configuration entries from the database table “core_config_data” that start with tax/euvat.



When the Module was installed using Composer

  • Enable the Maintenance Mode of your Magento Store using the Magento CLI command: magento maintenance:enable
  • Disable the extension using the Magento CLI command: magento module:disable Pisc_Euvat
  • Verify that the extension is now disabled using the Magento CLI command: magento module:status - The resulting list should show: Pisc_Euvat as disabled
  • To remove the extensions files, database schema and data resources use the Magento CLI command: magento module:uninstall Pisc_Euvat
  • Flush all Magento Caches using the Magento CLI command: magento cache:flush
  • Update the Dependency Injection configuration using the Magento CLI command: magento:di:compile
  • Disable the Maintenance Mode of your Magento Store using the Magento CLI command: magento maintenance:disable



When the Module was installed manually by copying the files

  • Enable the Maintenance Mode of your Magento Store using the Magento CLI command: magento maintenance:enable
  • Edit the file app/code/Pisc/Euvat/etc/module.xml and set <module name=“Pisc_Euvat” setup_version=“9.9.9”> to have the setup version at 9.9.9 and signalling the update script to perform an uninstall.
  • Perform magento setup:upgrade on the command line to update the Magento Store, this will perform the uninstall procedure on the EUVAT Module.
  • Check the log file var/log/euvat.log it should have related lines in it about the uninstall process.
  • Disable the module by using magento module:disable Pisc_Euvat.
  • Remove the directory app/code/Pisc/Euvat.
  • Flush all Magento Caches using the Magento CLI command: magento cache:flush
  • Disable the Maintenance Mode of your Magento Store using the Magento CLI command: magento maintenance:disable



Please also refer to the Magento 2.1 documentation on how to use the Magento CLI:



In the rare event that Magento was unable to create the Database Tables for EuVat by the automated setup itself, here are the SQL Commands to create the EuVat Database Tables manually.

Before creating these tables, look into the table names of the tables already existing in your Magento Database. These may carry a Table Prefix (for example: mage_).
In case such Table Prefix is used in your Magento Database, prefix the table names with the same Table Prefix (in our example: euvat_customer_exclude will get mage_euvat_customer_exclude).


Database Table 'euvat_customer_exclude'

CREATE TABLE IF NOT EXISTS 'euvat_customer_exclude' (
  `exclude_id` INT(11) NOT NULL AUTO_INCREMENT,
  `customer_id` INT(11) NOT NULL,
  `is_excluded` tinyint(4) NOT NULL,
  PRIMARY KEY (`exclude_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='EuVat - Exclude List for Customer VAT Status Updates';


Database Table 'euvat_vies_cache'

DROP TABLE IF EXISTS 'euvat_vies_cache';
CREATE TABLE IF NOT EXISTS 'euvat_vies_cache' (
  `cache_id` INT(11) NOT NULL AUTO_INCREMENT,
  `taxvat` VARCHAR(255) NOT NULL,
  `last_check` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `response` VARCHAR(255) NOT NULL,
  PRIMARY KEY (`cache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='EuVat - Cache Table for VIES queries';



Get Updates

Updates to all of your purchased Commercial Unlimited Licenses are available for Download in your Store Account: