Closed webchills closed 8 months ago
Found the reason in includes/classes/observers/auto.vat_for_eu_countries.php:
if ($this->vatNumber !== ''
does not recognize NULL in the entry_vat_number field, so all customers with entry_vat_number_field NULL in table address_book get this message and as well VAT ID: shown during checkout and in emails.
if ($this->vatNumber !== ''
has to be replaced with if (!empty ($this->vatNumber))
line 106:
if ((!empty($this->vatNumber) && $this->vatNumberStatus !== VatValidation::VAT_ADMIN_OVERRIDE && $this->vatNumberStatus !== VatValidation::VAT_VIES_OK)) {
line 155:
if (!empty ($this->vatNumber)) {
line 491:
if (!empty($this->vatNumber) || $current_page_base === FILENAME_ADDRESS_BOOK || $current_page_base === FILENAME_CHECKOUT_PAYMENT_ADDRESS) {
Although the result is different, this issue has the same root-cause as #21; closing as duplicate.
ZC157d PHP 8
Login with a "normal" customer without VAT ID Every customer without VAT ID gets an empty VAT number indicated (marked with * if unvalidated indicator is set in admin) during checkout in the billing address:
VAT Number:
Even if the customer has not even a compay field filled out in his address book This VAT Number: makes his way in the confirmation email as well This is a useless information and confusing for nomal customers without VAT ID VAT ID should only be shown during checkout and in emails if it exists and is validated