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