UPDATE_from_every_previous_version :
Since the beginning of this contribution (version 1.0...), I notice an error in the install.txt file :
The modification in the catalog/includes/classes/order.php file is not explained....but it should have been done...
If not, the VAT number is not displayed in the checkout_confirmation page and not saved in the orders table in the database.
The file was correctly modified and placed in the package but the modifications was not mentioned in the install.txt file.
If you installed the contribution with the install.txt file, please do the following:
===================================
In catalog/includes/classes/order.php
After those lines (around 34):
function query($order_id) {
global $languages_id;
$order_id = tep_db_prepare_input($order_id);
Add database field "billing_tva_intracom" in the following request:
//Add for TVA_intracom : "billing_tva_intracom"
$order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_tva_intracom, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
---------------------------------
After these lines (around 93):
$this->billing = array('name' => $order['billing_name'],
'company' => $order['billing_company'],
Add:
//BOF for VAT INTRACOM
'tva_intracom' => $order['billing_tva_intracom'],
// EOF for TVA_INTRACOM
---------------------------------
After those lines (around 141):
function cart() {
global $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, $payment;
$this->content_type = $cart->get_content_type();
Add database field "ab.entry_tva_intracom" in the following request:
//Add for TVA_intracom : "ab.entry_tva_intracom"
$customer_address_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_tva_intracom, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " co on (ab.entry_country_id = co.countries_id) where c.customers_id = '" . (int)$customer_id . "' and ab.customers_id = '" . (int)$customer_id . "' and c.customers_default_address_id = ab.address_book_id");
---------------------------------
After this line (around 146):
$shipping_address = tep_db_fetch_array($shipping_address_query);
Add database field "ab.entry_tva_intracom" in the following request:
$billing_address_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_company, ab.entry_tva_intracom, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, ab.entry_country_id, c.countries_id, c.countries_name, c.countries_iso_code_2, c.countries_iso_code_3, c.address_format_id, ab.entry_state from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) left join " . TABLE_COUNTRIES . " c on (ab.entry_country_id = c.countries_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)$billto . "'");
---------------------------------
After those lines (around 212):
$this->billing = array('firstname' => $billing_address['entry_firstname'],
'lastname' => $billing_address['entry_lastname'],
'company' => $billing_address['entry_company'],
Add:
//BOF for VAT INTRACOM
'tva_intracom' => $billing_address['entry_tva_intracom'],
// EOF for TVA_INTRACOM
=================================
I'm sorry about this oversight ....
I was always testing the contribution in my correct installation where the modification is done....