Re: VAT4EU Support Thread
I've just submitted v3.1.1 of VAT4EU for the Zen Cart moderators' review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#16: Correcting integration with Edit Orders, v4.6.0+.
#17: Use zen_cfg_read_only to ensure that the version number is read-only.
#18: Correct strict comparison that resulted in incorrect message to customer.
Re: VAT4EU Support Thread
Quote:
Originally Posted by
lat9
I've just submitted v3.1.1 of VAT4EU for the Zen Cart moderators' review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#16: Correcting integration with Edit Orders, v4.6.0+.
#17: Use zen_cfg_read_only to ensure that the version number is read-only.
#18: Correct strict comparison that resulted in incorrect message to customer.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2164
Re: VAT4EU Support Thread
Good day,
Sorry (if I do understand sometyhng wrong or issue has been already described), but the following code in auto.vat_for_eu_countries.php module can cause "Undefined variable" warning:
Code:
// -----
// Issued during the create-account, address-book or checkout-new-address processing, indicates that an address record
// has been created/updated and gives us a chance to record the customer's VAT Number.
//
// Entry:
// $p1 ... An associative array that contains the address-book entry's default data.
//
case 'NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_ADDRESS_BOOK_RECORD': //- Fall through ...
case 'NOTIFY_MODULE_CHECKOUT_ADDED_ADDRESS_BOOK_RECORD': //- Fall through ...
case 'NOTIFY_MODULE_ADDRESS_BOOK_UPDATED_ADDRESS_BOOK_RECORD': //- Fall through ...
case 'NOTIFY_MODULE_ADDRESS_BOOK_ADDED_ADDRESS_BOOK_RECORD':
$address_book_id = ($eventID === 'NOTIFY_MODULE_ADDRESS_BOOK_UPDATED_ADDRESS_BOOK_RECORD') ? $p1['address_book_id'] : $p1['address_id'];
$vat_number = zen_db_prepare_input($_POST['vat_number']);
$db->Execute(
"UPDATE " . TABLE_ADDRESS_BOOK . "
SET entry_vat_number = '$vat_number',
entry_vat_validated = " . $this->vatNumberStatus . "
WHERE address_book_id = $address_book_id
AND customers_id = " . (int)$_SESSION['customer_id'] . "
LIMIT 1"
);
break;
$_SESSION['customer_id'] is not yet defined in case of "NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_ADDRESS_BOOK_RECORD"
My humble suggestion is to use something like this instead:
(int)($eventID === 'NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_ADDRESS_BOOK_RECORD' ? $p1[0]['value'] : $_SESSION['customer_id'])
Re: VAT4EU Support Thread
Late come-back, but I'm preparing VAT4EU v3.2.0 for release and have this covered! That version will support Zen Cart versions 1.5.8a and 2.0.0, Edit Orders v4.7.0+, One-Page Checkout v2.4.6+ and the Bootstrap template v3.6.3+.
Re: VAT4EU Support Thread
v3.2.0 of the VAT for EU Countries is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2164
This release represents a massive restructuring, with support for
- Zen Cart versions 1.5.8a and 2.0.0
- PHP versions 8.0 through 8.3.
- Edit Orders, v4.7.0 and later
- One-Page Checkout, v2.4.6 and later
- Bootstrap template, v3.6.3 and later
A full list of the issues addressed in this release can be found here: https://github.com/lat9/vat4eu/issue...stone%3Av3.2.0
Re: VAT4EU Support Thread
I have just installed v3.2.0, but do not see the VAT for EU Countries under Admin Configuration.
No error logs have been created ...
Re: VAT4EU Support Thread
Quote:
Originally Posted by
siilike1232
I have just installed v3.2.0, but do not see the VAT for EU Countries under Admin Configuration.
No error logs have been created ...
Hmm, what version of Zen Cart and PHP is being used?
Re: VAT4EU Support Thread
Quote:
Originally Posted by
lat9
Hmm, what version of Zen Cart and PHP is being used?
ZC v2.0.1 and PHP 8.2
Re: VAT4EU Support Thread
OK, let's try to figure out where the installation failed. You'll need to use phpMyAdmin to check the following database tables.
1. configuration_group. Should have a record with a configuration_group_title of VAT4EU Plugin.
2. configuration. There should be 9 records with a configuration_key LIKE VAT4EU%.
3. admin_pages. Should have a record with a page_key of configVat4Eu.
4. address_book. Should have two new fields named entry_vat_number and entry_vat_validated.
5. orders. Should have two new fields named billing_vat_number and billing_vat_validated.
If you could perform the above database checks to see where the installation stopped, I can suggest what step to take next.