Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ordernumber issues


Guest

Recommended Posts

Posted

Not much to it - my shop isn't generating any ordernumbers. I can't find it anywhere and when trying to include it in checkout_succes.php or checkout_confirmation.php all I'm getting is the defined text followed by a blank.

 

I've tried using

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

and

<?php echo"$oID"; ?>

.

 

Help, please... Since I'm using pay in advance my costumers need to have an ordernumber to make sure their payments are being recognized. :huh:

Posted

Please, please, pleeeeaseee help me.

Or I'll start whining... :D

Posted

in your checkout_success.php after this code:

// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

 

add

 

	$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);

 

then in the html section further down, use your code as before see if it works

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

Posted

´

 

Ahh.. Worked like a charm at first try.

 

 

 

 

 

I'll be your slave in the afterlife. :D

Archived

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

×
×
  • Create New...