Guest Posted September 19, 2005 Share Posted September 19, 2005 The code I used to do this is <h3><?php echo YOUR_ORDER_NUMBER .' ' .$orders['orders_id'];?></h3> Results: YOUR_ORDER_NUMBER 128 Quote Link to comment Share on other sites More sharing options...
ebayer Posted September 28, 2005 Share Posted September 28, 2005 Hi, buddy. You can't do that!!! order id is only available after this order is placed. Before that, there is no order id. That's why you can't do that. And actually it's illogical to do that before the order is placed since there may be many customers on line at that time. They are shopping but they may not going to check out. If you still want to do that, you need add " insert $orders['orders_id'] The code I used to do this is<h3><?php echo YOUR_ORDER_NUMBER .' ' .$orders['orders_id'];?></h3> Results: YOUR_ORDER_NUMBER 128 Quote Link to comment Share on other sites More sharing options...
radders Posted September 28, 2005 Share Posted September 28, 2005 You didn't say whether your problem was with the 128 which can be solved amongst other ways by a database query (from Chemo): # Get the last order by this customer $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); or with the text YOUR_ORDER_NUMBER - define it in the language file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.