Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 65
  1. #41
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: VAT4EU Support Thread

    Hi Cindy

    This is a fresh install that I am using.
    Debbie Harrison
    DVH Design | Web Design blog

  2. #42
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: VAT4EU Support Thread

    Deb, I'm getting an update for VAT4EU going. In the interim, you can edit that naughty line in the Vat4EuAdminObserver, changing the highlighted function:
    Code:
    $vat_info =
                        '<tr>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td><strong>' . VAT4EU_ENTRY_VAT_NUMBER . '</strong></td>' . PHP_EOL .
                        '    <td>' . zen_draw_input_field('vat_number', zen_html_quotes($vat_number), 'size="45"') . $valid_indicator . $hidden_fields . '</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '</tr>' . PHP_EOL .
                        '<tr>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td><strong>' . VAT4EU_ENTRY_OVERRIDE_VALIDATION . '</strong></td>' . PHP_EOL .
                        '    <td>' . zen_draw_checkbox_field('vat_number_override', '', ($vat_validated == VatValidation::VAT_ADMIN_OVERRIDE)) . '</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '</tr>' . PHP_EOL;
                    $p2 .= $vat_info;
                    break;
    to
    Code:
    $vat_info =
                        '<tr>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td><strong>' . VAT4EU_ENTRY_VAT_NUMBER . '</strong></td>' . PHP_EOL .
                        '    <td>' . zen_draw_input_field('vat_number', zen_db_output($vat_number), 'size="45"') . $valid_indicator . $hidden_fields . '</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '</tr>' . PHP_EOL .
                        '<tr>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td><strong>' . VAT4EU_ENTRY_OVERRIDE_VALIDATION . '</strong></td>' . PHP_EOL .
                        '    <td>' . zen_draw_checkbox_field('vat_number_override', '', ($vat_validated == VatValidation::VAT_ADMIN_OVERRIDE)) . '</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '    <td>&nbsp;</td>' . PHP_EOL .
                        '</tr>' . PHP_EOL;
                    $p2 .= $vat_info;
                    break;

  3. #43
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    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.

  4. #44
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: VAT4EU Support Thread

    That works! Thanks Cindy.

    And yes please, do let us know when the update is okayed.

    Last edited by dharrison; 2 Mar 2020 at 01:53 PM. Reason: punctuation
    Debbie Harrison
    DVH Design | Web Design blog

  5. #45
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    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

  6. #46
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    47
    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") :-)

  7. #47
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: VAT4EU Support Thread

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

  8. #48
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    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)");
            }
        }

  9. #49
    Join Date
    Apr 2011
    Location
    Espoo, Finland
    Posts
    47
    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

  10. #50
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    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'.

 

 
Page 5 of 7 FirstFirst ... 34567 LastLast

Similar Threads

  1. v154 ZipShip - Support Thread
    By lat9 in forum Addon Shipping Modules
    Replies: 94
    Last Post: 16 Apr 2024, 10:07 PM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR