Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

When attempting to add order id to Checkout Succes


Guest

Recommended Posts

  • 2 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...