X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Order ID Random Incrementation... (https://forum.x-cart.com/showthread.php?t=25789)

carpeperdiem 02-10-2007 05:43 AM

Re: Order ID Random Incrementation...
 
Quote:

Originally Posted by wank3r
I read every post in this thread and was wondering how and where to just increase the order ID from my currently xx to xxxx ?

You should bookmark THIS THREAD - titled, "A List of things asked a million times..."

It is the very first thread in the FAQ forum.

Johny1 03-07-2007 03:16 AM

Re: Order ID Random Incrementation...
 
Works great!!! Thanks

MMANOR 03-14-2007 09:02 AM

Re: Order ID Random Incrementation...
 
Good Afternoon Everyone,

I was going through this thread and this is exactly something I would like to do as well. But instead of advancing the order number by a set value, I was hoping to have the system create a random number between 1000000 and 9999999. So I was thinking of something like this

mt_srand ((double)microtime() * 1000000);
$reference_number = "1";
$reference_number .= mt_rand (1000000,9999999);

Would this work with X-cart? I am trying to figure out, based on all of the topic replies where I should fit this in.

Please help. Thank you.

carpeperdiem 03-14-2007 09:08 AM

Re: Order ID Random Incrementation...
 
But what will make it a unique number? This will require the database to know the numbers already used, then a call to the db to see if it's avail, then a write to the db to log a used number. Can you do this? I don't know how. But it's a good idea if it can be easily done.

Reed 03-14-2007 04:37 PM

Re: Order ID Random Incrementation...
 
Works in 4.1.5 after changing the code that mffowler refered to! Excellent quick mod that should be used by all stores. Thanks!

qinwubi 07-09-2007 08:49 AM

Re: Order ID Random Incrementation...
 
works like a charm, thanks!

SystemSkins 11-17-2007 05:21 AM

Re: Order ID Random Incrementation...
 
Why would someone want a mod like this? Just to appear to the customer that you are doing high volume? Do you feel this would be benificial if your customers thought you did more volume than you really did? Do you think you would loose repeat business just because your web order number is low? I mean everyone has to start somewhere right?

From a quickbooks standpoint does x-cart download into your quickbooks in a sequential number by "1" with this mod or with your "random gaped number"? Without getting involved or knowing alot about this mod, I can just hear my accountant now, "Wheres the missing numbers?" This wouldn't raise a red flag for audits?

drudden 11-17-2007 07:32 AM

Re: Order ID Random Incrementation...
 
Customers want to do business with a reputable company. If they appear to be the only person buying from you, they may start wondering why they are your only customer. You can't assume a customer will be understanding and give you the benefit of the doubt just because you are a new business starting up.

In addition, with sequential order numbers your competitor can easily find out how much volume you are doing if they wanted to.

You may want to use the random mod during the startup of your store. After you get a steady inflow of sales, you can change it back. Your accountant should understand as long as you can account for everything.

SystemSkins 11-17-2007 07:44 AM

Re: Order ID Random Incrementation...
 
Quote:

Originally Posted by drudden
In addition, with sequential order numbers your competitor can easily find out how much volume you are doing if they wanted to.


LOL that is exactly what I did. I figured out that my competitor does on average 280 orders per day based on "secret shopping" from them in 2 week increments over a 2 month period. Now that I seen this thread I have my doubts that their volume is that much. However it actually could be according to thier "About our company" stating the size of their facility and equipment that they have.


Is there a way to see what your actual order number would be had you not of used the random order number?

If I launch my site using the random number generator and after 6 months I have an order number of 1283. Is there a way to see that that is actually order number 398?

I'm more than likely going to install this mod before launch.

carpeperdiem 11-17-2007 02:21 PM

Re: Order ID Random Incrementation...
 
Amazon.com uses random order IDs.

The order # for the cart doesn't have to be anything more than a reference number. Your accounting software software can (should?) be sequential, but it really doesn't matter, if you can generate a report...

You can set the randomizer to small numbers or large numbers... doesn't really matter, if the purpose is simply "reference numbers" -- but check with your state or country trade office if you want to be certain. In the US, sequential reference numbers for orders is not law. It may be law in some countries.


All times are GMT -8. The time now is 08:10 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.