Results 1 to 10 of 90

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: VAT4EU Support Thread

    I've just submitted v2.0.3 of VAT4EU to the Zen Cart moderators for their review; I'll post back here once it's available for download.

    This release contains changes associated with the following GitHub issue:

    #6: Correct call to unknown zen_html_quotes function.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: VAT4EU Support Thread

    Quote Originally Posted by lat9 View Post
    I've just submitted v2.0.3 of VAT4EU to the Zen Cart moderators for their review; I'll post back here once it's available for download.

    This release contains changes associated with the following GitHub issue:

    #6: Correct call to unknown zen_html_quotes function.
    Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2164

  3. #3
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    71
    Plugin Contributions
    0

    Default Re: VAT4EU Support Thread

    Hello,

    This add-on is unfortunately not working for VAT-Numbers from Greece.

    (It seems a little bit strange to me, I'm the first, who noticed this, but I haven't found any information about this 'bug' in this thread - please excuse me, if I've missed something)

    The problem is: Greek VAT-Numbers are an exception, they're starting with 'EL', but not with 'GR' (short Country cobe by ISO)

    The problem can be fixed, by adding the following code:

    Code:
    $country_iso_code_2 = $country_iso_code_2 == 'GR' ? 'EL' : $country_iso_code_2;
    after

    Code:
    $country_iso_code_2 = $this->getCountryIsoCode2($countries_id);
    in validateVatNumber method (file Vat4EuAdminObserver.php)


    ...Or you can simply replace ISO-2 code for Greece (from "GR" to "EL") :-)

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: VAT4EU Support Thread

    Thanks for that! I've opened an issue on the VAT4EU GitHub to track the associated change.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: VAT4EU Support Thread

    @yesaul, I chose to make a slightly different change so that the corrected validation would apply to both the admin and the storefront, changing /includes/classes/VatValidation.php:
    Code:
        // -----
        // The class constructor gathers the to-be-verified country-code (2-character ISO) and
        // the associated VAT Number.  The "VAT Number" value must include any country code
        // prefix.
        //
        // Since we'll need the SOAP service to automatically validate the VAT Number, check now
        // to see that the PHP installation includes that service, logging a warning if not.
        //
        public function __construct($countryCode, $vatNumber) 
        {
            if (defined('VAT4EU_ENABLED') && VAT4EU_ENABLED == 'true') {
                $this->debug = (defined('VAT4EU_DEBUG') && VAT4EU_DEBUG == 'true');
                
                // -----
                // Greek VAT numbers start with 'EL' instead of their country-code ('GR').
                //
                $this->countryCode = ($countryCode == 'GR') ? 'EL' : $countryCode;
                $this->vatNumber = strtoupper($vatNumber);
                
                if (!class_exists('SoapClient')) {
                    trigger_error('VAT Number validation not possible, "SoapClient" class is not available.', E_USER_WARNING);;
                } else {
                    $this->soapInstalled = true;
                    try {
                        $this->_client = new SoapClient(self::WSDL, array('trace' => true) );
                    } catch(Exception $e) {
                        $this->soapInstalled = false;
                        trigger_error("VAT Number validation not possible, VAT Translation Error: " . $e->getMessage(), E_USER_WARNING);
                    }
                }
                $this->trace("__construct($countryCode, $vatNumber)");
            }
        }

  6. #6
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    71
    Plugin Contributions
    0

    Default Re: VAT4EU Support Thread

    @lat9, Sure, your solution is better :-)

    But note: it is necessary also to replace 'EL' to 'GR' (or simply add 'GR') in VAT4EU_EU_COUNTRIES configuration key

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: VAT4EU Support Thread

    Quote Originally Posted by yesaul View Post
    @lat9, Sure, your solution is better :-)

    But note: it is necessary also to replace 'EL' to 'GR' (or simply add 'GR') in VAT4EU_EU_COUNTRIES configuration key
    Most excellent point, @yesaul. Thanks for the update. I'll get that updated 'shortly'.

  8. #8
    Join Date
    Oct 2007
    Posts
    412
    Plugin Contributions
    0

    Default Re: VAT4EU Support Thread

    Quote Originally Posted by yesaul View Post
    @lat9, Sure, your solution is better :-)

    But note: it is necessary also to replace 'EL' to 'GR' (or simply add 'GR') in VAT4EU_EU_COUNTRIES configuration key
    Where exactly do I add 'GR'? In what file?

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. v154 ZipShip - Support Thread
    By lat9 in forum Addon Shipping Modules
    Replies: 108
    Last Post: 14 Jan 2025, 05:42 PM
  3. SysCheck [support thread]
    By swguy in forum All Other Contributions/Addons
    Replies: 36
    Last Post: 24 Oct 2020, 05:28 AM
  4. Wordpress On ZC [Support Thread]
    By hira in forum All Other Contributions/Addons
    Replies: 1858
    Last Post: 17 Jan 2014, 01:24 AM
  5. ZJ Silver Support Thread
    By anthonyd in forum Addon Templates
    Replies: 220
    Last Post: 5 Nov 2010, 03:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg