Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Scrambled Order Numbers


Guest

Recommended Posts

I have just installed this contribution and am suffering a problem.

 

Order numbers are not advancing if there is another order showing in admin. I have tried putting the order to a different status but if a new order is placed the new one just over-writes the older order.

 

If I delete the order that is showing in admin->orders then the order number advances to the next order.

 

I don't know where to start looking to rectify this problem.

 

Thanks in advance for your help.

 

-turner2000

Link to comment
Share on other sites

  • 1 month later...
  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

I installed the scrambled order number with the optional display at checkout success - Great contribution!!

 

One item I noticed is that when I place a test order and check my account history it shows this (both the hidden number and the scrambled number) - any suggestions?:

 

My Order History My Order History

Order Number: 1270 Order Number: SUM-671219808

 

Also, on the checkout success screen it displays:

 

AAA-O everytime, not sure how to fix this.

 

Thanks for any help!

 

ALSO, Found error in most recent posting of this contribution - may want to fix it as it won't work without it

 

WAS

(3G)

.../catalog/includes/modules/payment.php (((((< ----this line incorrect!!!

 

--------------

* Approx line 170 (in the function 'after_process'). Replace the two lines...

 

$message = 'Order #' . $insert_id . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n";

 

tep_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info: #' . $insert_id, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

...with these (three lines). Note that I have removed the '#' here from the text because

I think it looks tidier, but you are, of course, free to format this how you wish...

 

// >>> BEGIN SCRAMBLED_ORDER_NUMBER

$scrambled_order_num = randomise_order_num($insert_id);

$message = 'Order num.' . $scrambled_order_num . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n";

 

tep_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info:' . $scrambled_order_num, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// <<< END SCRAMBLED_ORDER_NUMBER

 

 

SHOULD BE

(3G)

.../catalog/includes/modules/payment/cc.php

 

--------------

* Approx line 170 (in the function 'after_process'). Replace the two lines...

 

$message = 'Order #' . $insert_id . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n";

 

tep_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info: #' . $insert_id, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

...with these (three lines). Note that I have removed the '#' here from the text because

I think it looks tidier, but you are, of course, free to format this how you wish...

 

// >>> BEGIN SCRAMBLED_ORDER_NUMBER

$scrambled_order_num = randomise_order_num($insert_id);

$message = 'Order num.' . $scrambled_order_num . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n";

 

tep_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info:' . $scrambled_order_num, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// <<< END SCRAMBLED_ORDER_NUMBER

Link to comment
Share on other sites

  • 4 months later...
  • 5 months later...

Anyone find a solution to the WXQ-509032644 problem where in checkout_success it displays WXQ-509032644 rather than the real order number but in the email and admin it displays the real order no ok?

 

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

I just want to say thanks for an great contribution.

 

I have installed it and all worked great on my localhost, but when i uploaded it to my live website i only get blank pages, on account.php, account_history.php, account_history_info.php and all admin files that has something to do with the orders.

 

Does anyone know the answer to this?

 

Is there some versions of php i supports and some not or is there something else i have to do?

 

Thanks in advance

 

Best Regards

Thomas Borge

Link to comment
Share on other sites

I figured it out tonight.

 

The problem i made was not to upload the scrambled_order_num.php file where it belonged on my live webserver :D

 

Thanks again for an great contribution.

 

Best Regards

Thomas B

 

I just want to say thanks for an great contribution.

 

I have installed it and all worked great on my localhost, but when i uploaded it to my live website i only get blank pages, on account.php, account_history.php, account_history_info.php and all admin files that has something to do with the orders.

 

Does anyone know the answer to this?

 

Is there some versions of php i supports and some not or is there something else i have to do?

 

Thanks in advance

 

Best Regards

Thomas Borge

Link to comment
Share on other sites

  • 4 months later...

I know this contribution is old, but i was looking for a order number that was a bit more realistic, and didnt give up how few orders I had had. :D

 

All the options I see talk of changing the display order number, leaving the real order number the same - why?

 

Is it not possible to either just set the starting order_id to a greater number, or to add another attribute to the table that would have the extended order number, this way even though you still need to change the display - you always have a connection to the number you use to display to customer, it isnt something generated on display.

 

Also for me prepending the order id with the order date would do the job as well.

Link to comment
Share on other sites

  • 2 months later...
I know this contribution is old, but i was looking for a order number that was a bit more realistic, and didnt give up how few orders I had had. :D

 

All the options I see talk of changing the display order number, leaving the real order number the same - why?

 

Is it not possible to either just set the starting order_id to a greater number, or to add another attribute to the table that would have the extended order number, this way even though you still need to change the display - you always have a connection to the number you use to display to customer, it isnt something generated on display.

 

Also for me prepending the order id with the order date would do the job as well.

I know this question was posted some time ago, but I have a spare minute so here goes...

 

To answer your point re "display" vs "real" order number, the OSC database can only use the "real" (ie, 1, 2, 3...) order number. It simply can not take an arbitrary (random) order number and somehow relate this to an order record in the database. Well, it COULD, but to do this requires a lot of changes to the code and is basically too complicated, generally unmanageable, expensive (in terms of database access) and (as it turns out) unnecessary.

 

In order to keep the database indexing simple, the scrambled order number contribution does not change the database order number format at all. It is EXACTLY the same as the base OSC. This is a GOOD thing!

 

However, the requirement is to present a "random" order number to the customer. Therefore, the OSC code (with this contribution) uses the "real" order number as normal and ONLY converts it to a "display" (or scrambled) order number when it needs to present the order number to the customer (whether this be on the web page or in an email).

 

Because the user only knows about the "display" version of the order number, we also need the ability to convert this back to a "real" order number so that when a customer sends us an email to complain that we've sent them the wrong thing, we can put the "display" order number into the order search box (in the admin pages), convert it to a "real" order number and access the appropriate database record.

 

The important thing to remember is that the user ONLY sees the "display" order number and the OSC code can only use (and only NEEDS to use) the "real" order number. The "display" order number is not stored anywhere in the database; it is always generated on the fly from the "real" number. This answers your other point. That is, by always generating the "display" order number on the fly like this, there is no need to store it anywhere and therefore no need to modify the database from its standard configuration. By using the "randomise" and "derandomise" functions (defined in the contribution), we can always relate one to the other. This keeps things much simpler.

 

Rich.

Link to comment
Share on other sites

  • 1 month later...

Hi

 

just installed this contrib and it seems to be working in the admin section. I haven't got a checkout setup yet so can't test fully.

 

I have changed the define('HASH_PREFIX_LEN', 3); to define('HASH_PREFIX_LEN', 1); but how do I change the prefix letter? At the moment it is to O (oh and not zero) but I didn't set it to that.

 

Thanks

 

Ian

Link to comment
Share on other sites

  • 10 months later...
  • 2 years later...

Hi

 

I'm looking for an addon for "Order Editing Tool" contribution.

I'd like to use scrambled order number with this Order Editing Tool same time.

 

Please Help Me.

Link to comment
Share on other sites

  • 3 years later...

Has anyone gotten this module to work with paypal_standard.php? I tried and I'm unable to have the scrambled order number sent in the order confirmation email when the payment is made through the paypal_standard.php module.

 

I made the below code modifications in paypal_standard.php, what else am I missing?

 

// >>> BEGIN SCRAMBLED_ORDER_NUMBER
require('includes/functions/scrambled_order_num.php');
// <<< END SCRAMBLED_ORDER_NUMBER
// lets start with the email confirmation
// >>> BEGIN SCRAMBLED_ORDER_NUMBER
$scrambled_order_num = randomise_order_num($insert_id);
// <<< END SCRAMBLED_ORDER_NUMBER
 $email_order = STORE_NAME . "\n" .
				 EMAIL_SEPARATOR . "\n" .
 // >>> BEGIN SCRAMBLED_ORDER_NUMBER
 EMAIL_TEXT_ORDER_NUMBER . ' ' . $scrambled_order_num . "\n" .
 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $scrambled_order_num, 'SSL', false) . "\n" .
 // <<< END SCRAMBLED_ORDER_NUMBER					
				 EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" .

Edited by bbott
Link to comment
Share on other sites

Has anyone gotten this module to work with paypal_standard.php? I tried and I'm unable to have the scrambled order number sent in the order confirmation email when the payment is made through the paypal_standard.php module.

 

I made the below code modifications in paypal_standard.php, what else am I missing?

 

// >>> BEGIN SCRAMBLED_ORDER_NUMBER
require('includes/functions/scrambled_order_num.php');
// <<< END SCRAMBLED_ORDER_NUMBER
// lets start with the email confirmation
// >>> BEGIN SCRAMBLED_ORDER_NUMBER
$scrambled_order_num = randomise_order_num($insert_id);
// <<< END SCRAMBLED_ORDER_NUMBER
    $email_order = STORE_NAME . "\n" .
                    EMAIL_SEPARATOR . "\n" .
    // >>> BEGIN SCRAMBLED_ORDER_NUMBER
    EMAIL_TEXT_ORDER_NUMBER . ' ' . $scrambled_order_num . "\n" .
    EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $scrambled_order_num, 'SSL', false) . "\n" .
    // <<< END SCRAMBLED_ORDER_NUMBER                    
                    EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" .

 

I'm surprised nobody else has had this issue or has a fix being that PayPal standard is such a popular addon.

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...