Hi everyone,
I need to display customers fax in the order page, in the admin (that one where you can see all the customers details like address, email, phone, etc).
I have tried the following, but still no success. I really apreciate your help.
In admin/orders.php, I added this code:
Code:
"%' or o.customers_fax like '%"
Also this:
Code:
<tr>
<td class="main"><strong><?php echo ENTRY_FAX_NUMBER; ?></strong></td>
<td class="main"><?php echo $order->customer['fax']; ?></td>
</tr>
After these changes, in my order page, it appears "Fax number:" text, but not the actual fax.
So, in admin/includes/classes/order.php I basicaly added fax. I replaced this:
Code:
function query($order_id) {
global $db;
$order = $db->Execute("select cc_cvv, 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_street_address, billing_suburb, billing_city, billing_postcode,
billing_state, billing_country, billing_address_format_id,
coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
cc_type, cc_owner, cc_number, cc_expires, currency,
currency_value, date_purchased, orders_status, last_modified,
order_total, order_tax, ip_address
from " . TABLE_ORDERS . "
where orders_id = '" . (int)$order_id . "'");
by this:
Code:
function query($order_id) {
global $db;
$order = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
customers_suburb, customers_city, customers_postcode,
customers_state, customers_country, customers_telephone, customers_fax,
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_street_address, billing_suburb, billing_city, billing_postcode,
billing_state, billing_country, billing_address_format_id,
coupon_code, payment_method, payment_module_code, shipping_method, shipping_module_code,
cc_type, cc_owner, cc_number, cc_expires, currency,
currency_value, date_purchased, orders_status, last_modified,
order_total, order_tax, ip_address
from " . TABLE_ORDERS . "
where orders_id = '" . (int)$order_id . "'");
And this:
Code:
$this->customer = array('name' => $order->fields['customers_name'],
'company' => $order->fields['customers_company'],
'street_address' => $order->fields['customers_street_address'],
'suburb' => $order->fields['customers_suburb'],
'city' => $order->fields['customers_city'],
'postcode' => $order->fields['customers_postcode'],
'state' => $order->fields['customers_state'],
'country' => $order->fields['customers_country'],
'format_id' => $order->fields['customers_address_format_id'],
'telephone' => $order->fields['customers_telephone'],
'email_address' => $order->fields['customers_email_address']);
by this:
Code:
$this->customer = array('name' => $order->fields['customers_name'],
'company' => $order->fields['customers_company'],
'street_address' => $order->fields['customers_street_address'],
'suburb' => $order->fields['customers_suburb'],
'city' => $order->fields['customers_city'],
'postcode' => $order->fields['customers_postcode'],
'state' => $order->fields['customers_state'],
'country' => $order->fields['customers_country'],
'format_id' => $order->fields['customers_address_format_id'],
'telephone' => $order->fields['customers_telephone'],
'fax' => $order->fields['customers_fax'],
'email_address' => $order->fields['customers_email_address']);
After that, I get this error when I enter my customer order page:
1054 Unknown column 'customers_fax' in 'field list'
Can anyone help me with this or give me a hint where to go? please,
Thanks,
MikeX
Bookmarks