Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Scrambled Order Number


kittidid

Recommended Posts

I am trying to add the correct coding to the invoice page, packing slip and customers order page. All in the admin area. Can someone help please?

 

Invoice:

 

<!-- Customers ID# // -->

<tr>

<td class="main"><b>Customers # </b></td>

<td class="main"><?php echo $the_customers_id; ?></td>

</tr>

<!-- add Order # // -->

<tr>

<td class="main"><b>Order # </b></td>

<td class="main"><?php echo tep_db_input($oID); ?></td>

</tr>

<!-- add date/time // -->

 

Packing Slip

 

<!-- add Order # // -->

<tr>

<td class="main"><b>Order # </b></td>

<td class="main"><?php echo tep_db_input($oID); ?></td>

</tr>

<!-- add date/time // -->

<tr>

<td class="main"><b>Date & Time</b></td>

<td class="main"><?php echo tep_datetime_short($order->info['date_purchased']); ?></td>

</tr>

 

 

Customers Order:

// >>> BEGIN SCRAMBLED_ORDER_NUMBER

// Allow both scrambled and non-scrambed order numbers to be input

$order_exists = false;

$scrambled_order_num = $HTTP_GET_VARS['oID'];

if (!is_numeric($HTTP_GET_VARS['oID']))

{

// Looks like a scrambled order number has been supplied - descramble it for the database query

$scrambled_order_num = $HTTP_GET_VARS['oID'];

$HTTP_GET_VARS['oID'] = derandomise_order_num($HTTP_GET_VARS['oID']);

if ($HTTP_GET_VARS['oID'] == 0)

{

$messageStack->add(sprintf(ERROR_ORDER_NUM_ILLEGAL, $scrambled_order_num), 'error');

}

}

else

{

// Plaintext order number supplied

$scrambled_order_num = randomise_order_num($HTTP_GET_VARS['oID']);

}

 

if ($HTTP_GET_VARS['oID'] != 0)

{

$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 . ' ( '.$scrambled_order_num.' )'), 'error');

}

}

// <<< END SCRAMBLED_ORDER_NUMBER

}

// BOF: WebMakers.com Added: Additional info for Orders

// Look up things in orders

$the_extra_query= tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");

$the_extra= tep_db_fetch_array($the_extra_query);

$the_customers_id= $the_extra['customers_id'];

// Look up things in customers

$the_extra_query= tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $the_customers_id . "'");

$the_extra= tep_db_fetch_array($the_extra_query);

$the_customers_fax= $the_extra['customers_fax'];

// EOF: WebMakers.com Added: Additional info for Orders

 

 

I really need to eliminate all references to Webmakers order number and use scrambled order number only. I see in several admin pages, the webmakers order number and the scrambled order number.

 

What do I need to do? :(

 

Lost Kitti

Edited by kittidid
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...