Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how can i show the order_id in the checkout_success.php.


buchhi

Recommended Posts

In checkout_success.php , add:

 

 

<?php
$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");
$customer_orders = tep_db_fetch_array($customer_orders_query);
echo 'Your Order ID is ' . $customer_orders['orders_id'] . '<br><br>';
?>

 

 

Just after:

<td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>

Open source n'est pas un échange à sens unique ... La plupart du temps un simple merci ou quelques mots d'encouragement suffisent...

Link to comment
Share on other sites

<?php echo $orders['orders_id']; ?>

 

No Burt, $orders['orders_id'] is available depending on "global_product_notifications" value.

 

  if ($global['global_product_notifications'] != '1') {
$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);

Open source n'est pas un échange à sens unique ... La plupart du temps un simple merci ou quelques mots d'encouragement suffisent...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...