Guest Posted May 17, 2007 Posted May 17, 2007 Not much to it - my shop isn't generating any ordernumbers. I can't find it anywhere and when trying to include it in checkout_succes.php or checkout_confirmation.php all I'm getting is the defined text followed by a blank. I've tried using <?php echo $orders['orders_id'] ?> and <?php echo"$oID"; ?> . Help, please... Since I'm using pay in advance my costumers need to have an ordernumber to make sure their payments are being recognized. :huh:
Guest Posted May 20, 2007 Posted May 20, 2007 Please, please, pleeeeaseee help me. Or I'll start whining... :D
Guest Posted May 20, 2007 Posted May 20, 2007 in your checkout_success.php after this code: // if the customer is not logged on, redirect them to the shopping cart page if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } add $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1"); $orders = tep_db_fetch_array($orders_query); then in the html section further down, use your code as before see if it works <?php echo $orders['orders_id'] ?>
Guest Posted May 21, 2007 Posted May 21, 2007 ´ Ahh.. Worked like a charm at first try. I'll be your slave in the afterlife. :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.