Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Random order number


Da_Bear

Recommended Posts

I downloaded the instruktions for making random ordernumber from http://www.oscommerce.com/community/contributions,1172

 

But, things are missing, now I can't edit, delete etc. my incoming orders. Just get this message on top of the page "Error: order does not exist".

 

I checked in /admin/orders.php and I think some lines must be changed accordingly to my prior changes to checkout_process.php

And there must be some more changes I have to do in other php files to get all things working. I would really appreciate some help :)

 

The lines in admin/orders.php I suspect is wrong.

 

  if (($action == 'edit') && isset($HTTP_GET_VARS['oID'])) {
   $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);

   $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
   $order_exists = true;
   if (!tep_db_num_rows($orders_query)) {
     $order_exists = false;
     $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');

 

What I have changed in my files can you see if you download Random Order Number from contributions.

 

 

 

And by the way. The search function at this board is **** :lol:

Link to comment
Share on other sites

  • 2 months later...

Hi there,

 

Did you ever fix this problem? I am experiencing it at the moment, and agree with you, the problem seems to be the following bit of code:

 

(int)$oID

 

If I use, say, a six digit number instead of a Random Number such as 123-4567-8901, everything seems to work okay.

 

Any help would be most appreciated.

 

KS

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...