LOBELLO Posted December 24, 2004 Posted December 24, 2004 How I add the order number on checkout_sucesse page? please...anybody help me!
stevel Posted December 24, 2004 Posted December 24, 2004 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. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description
bobg7 Posted December 24, 2004 Posted December 24, 2004 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.
stevel Posted December 24, 2004 Posted December 24, 2004 The suggested text was just an example for how to use it. I'm glad it worked for you. I've seen others ask for this, and I haven't looked to see if there's a KB or contrib on it. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description
LOBELLO Posted December 24, 2004 Author Posted December 24, 2004 Cool, just tried it, made one slight change and it works like a charm. :thumbsup: From: To: Happy Holidays, Bob G. <{POST_SNAPBACK}> Thanks!!! Thats all right!!! THANKSSSSSSSSSSSSSSSSSSSSSSSS!!!!!! :D :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.