Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Order ID Random Incrementation...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 02-10-2007, 05:43 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #12  
Old 03-07-2007, 03:16 AM
 
Johny1 Johny1 is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 72
 

Default Re: Order ID Random Incrementation...

Works great!!! Thanks
__________________
X-Cart Gold 4.5.4
Reply With Quote
  #13  
Old 03-14-2007, 09:02 AM
 
MMANOR MMANOR is offline
 

Member
  
Join Date: Feb 2007
Posts: 28
 

Default 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.
__________________
x-cart-4.1.8gold
Reply With Quote
  #14  
Old 03-14-2007, 09:08 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #15  
Old 03-14-2007, 04:37 PM
 
Reed Reed is offline
 

Member
  
Join Date: Jan 2005
Posts: 13
 

Default 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!
__________________
X-Cart Gold Version 4.1.5
Reply With Quote
  #16  
Old 07-09-2007, 08:49 AM
 
qinwubi qinwubi is offline
 

Member
  
Join Date: Jul 2006
Posts: 16
 

Default Re: Order ID Random Incrementation...

works like a charm, thanks!
__________________
all the best,
Wubi
:::::::::
xcart gold v4.3.2 with lots of customizations
Linux
Php 5.2.4
MySQL: 4.1.22-standard
Reply With Quote
  #17  
Old 11-17-2007, 05:21 AM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default 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?
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #18  
Old 11-17-2007, 07:32 AM
 
drudden drudden is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 66
 

Default 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.
__________________
Thanks,

Dan

X-Cart Version 4.3.1
Reply With Quote
  #19  
Old 11-17-2007, 07:44 AM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default 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.
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #20  
Old 11-17-2007, 02:21 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:59 PM.

   

 
X-Cart forums © 2001-2020