Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help - Order Number on checkout_sucesses.php


LOBELLO

Recommended Posts

Posted

In checkout_process.php, after these lines (around line 99)

  tep_db_perform(TABLE_ORDERS, $sql_data_array);
 $insert_id = tep_db_insert_id();

add this:

  if (!tep_session_is_registered('last_order_id')) tep_session_register('last_order_id');
 $last_order_id = $insert_id;

Now in checkout_success.php, the variable $last_order_id has the order ID. Use it in any way you see fit. For example, you could add:

<h3>Your order ID is <?php echo $last_order_id; ?></h3>

just before the TEXT_THANKS_FOR_SHOPPING is displayed.

Posted

Cool, just tried it, made one slight change and it works like a charm. :thumbsup:

 

From:

<h3>Your order ID is <?php echo $last_order_id; ?></h3>

 

To:

<h3>Your order Number is <?php echo $last_order_id; ?>. Please refer to this number if you have any questions and also write this number on your check or money order if you are mailing your payment.</h3>

 

Happy Holidays,

Bob G.

Installed Contributions: CCGV, Close Popup, Dynamic Meta Tags, Easy Populate, Froogle Data Feeder, Google Position, Infobox Header Entire Row, Live Support for OSC, PayPal Seal with CC images, Report_m Sales, Shop by Price Revised, SQL Updater, Who's Online Enhancement, Footer, GNA EP Assistant and still going.

Posted
Cool, just tried it, made one slight change and it works like a charm.  :thumbsup:

 

From:

To:

Happy Holidays,

Bob G.

 

 

Thanks!!! Thats all right!!! THANKSSSSSSSSSSSSSSSSSSSSSSSS!!!!!! :D :D

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...