Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Managing Customers and Orders / retreive order_total and customers_email_address in TABLE_ORDERS

retreive order_total and customers_email_address in TABLE_ORDERS

Started by george_usa on 3 Jan 2011, 6:43 PM · Views: 954

Results 1 to 2 of 2
3 Jan 2011, 6:43 PM
#1
george_usa avatar

george_usa

New Zenner

Join Date:
Nov 2010
Posts:
37
Plugin Contributions:
0

retreive order_total and customers_email_address in TABLE_ORDERS

hello,

i've been trying to retreive order_total and customers_email_address in TABLE_ORDERS at /index.php?main_page=account_history_info&order_id=120

i tried hard and many combinations and finally to add following lines in tpl_account_history_info_default.php, but it doesn't give me the two data. im sorry that i don't know php well. hope someone expert here could offer the help. any help is appreciated.

<?php $myorderno = $_GET['order_id']; $my_query = "SELECT order_total, customers_email_address FROM " . TABLE_ORDERS . " WHERE orders_id = $myorderno"; $my_query = $db->Execute($my_query); $my_ot = $my_query->field['order_total']; $my_email = $my_query->field['customers_email_address']; echo $my_ot; echo $my_email; ?>
4 Jan 2011, 3:21 AM
#2
george_usa avatar

george_usa

New Zenner

Join Date:
Nov 2010
Posts:
37
Plugin Contributions:
0

Re: retreive order_total and customers_email_address in TABLE_ORDERS

with continuous effort to resolve my issue, i found the cause, there was s missing, causing the issue.

$my_ot = $my_query->fields['order_total'];
$my_email = $my_query->fields['customers_email_address'];

thanks still goes to this forum.