
Originally Posted by
wisehoot
This is what I've done so far. It works fine:
adding to the end of MY_TEMPLATES/TEMPLATES/tpl_checkout_success_default.php
<!-- MY CODE-->
<?php
$MERCHANT_ORDER_ID = $zv_orders_id;
global $db;
/**$sql = "select * from " . TABLE_ORDERS . " where orders_id = $zv_orders_id";*/
$sql = "SELECT . TABLE_ORDERS .*, . TABLE_ORDERS_PRODUCTS.*\n"
. "FROM " . TABLE_ORDERS . " INNER JOIN . TABLE_ORDERS_PRODUCTS. ON . TABLE_ORDERS .orders_id = . TABLE_ORDERS_PRODUCTS.orders_id\n"
. "WHERE (((. TABLE_ORDERS . orders_id)=$zv_orders_id)) LIMIT 0, 30 ";
$result = $db->Execute($sql);
if ($result->RecordCount() > 0) {
$CUSTOMER_EMAIL = $result->fields['customers_email_address'];
$ORDER_TOTAL= $result->fields['order_total'];
$ORDER_SHIPPING = '0';
$ORDER_TAX = $result->fields['order_tax'];
$ORDER_EST_SHIP_DATE = mktime(0,0,0,date("m"),date("d")+10,date("Y"));
$ITEM_PRICE = $result->fields['products_price'];
$ITEM_QUANTITY = $result->fields['products_quantity'];
} else {
echo 'Sorry, no record found for product number ' . $theProductId;
}
====================
DO NOT USE THIS CODE, SINCE THE TABLE NAMES MIGHT BE REFERENCED WRONG. I use the real name of tables in my query.
Hope this gives some ideas to those interested.
Thanks
wisehoot