Page 1 of 3

Where would you start your order number iteration at?

Posted: Sun Feb 15, 2009 8:20 pm
by sparrrow
Just a poll... So you create a new ecommerce site, and are ready to push it to production and start bringing in orders. What number do you start your order number auto-increment at? and why? A random number seems non-sensical and possibly difficult to track and report on, yet a flat rounded number may make it too easy for someone to determine how many web orders you've had.

Re: Where would you start your order number iteration at?

Posted: Mon Feb 16, 2009 9:22 am
by alex.barylski
What number do you start your order number auto-increment at? and why?
Start at one as it's the default auto-increment number provided by MySQL. Random introduces potential collision, requiring a re-attempt.

I guess I would ask myself, who cares if anyone figures out how many web orders I've had. Prefix the order with some junk that is used strictly for aesthetica reasons.

Code: Select all

$pkid = 1;
$order = "AK-E57X-$pkid";
 
echo '<a href="?orderid='.$order.'">Some Item</a>';
 

Re: Where would you start your order number iteration at?

Posted: Mon Feb 16, 2009 12:56 pm
by Christopher
sparrrow wrote:... yet a flat rounded number may make it too easy for someone to determine how many web orders you've had.
If your criterion is to have a starting number that makes it difficult for someone to "determine how many web orders you've had" (or perhaps give the impression that you have a lot of orders ;)) then pick a number that makes you happy. There is no technical reason for this, so follow your heart! ;)

Re: Where would you start your order number iteration at?

Posted: Mon Feb 16, 2009 1:57 pm
by josh
You could just multiply the order numbers whenever the user sees them, as long as you multiply by the same amount every time. Unless someone is repeatedly ordering they wouldn't notice a pattern. If you don't mind the programming doing the re-attempt isn't that big of a deal. I've generated things like serial keys by performing modifications to an md5 of the primary key, etc...

Re: Where would you start your order number iteration at?

Posted: Wed Feb 18, 2009 3:43 pm
by sparrrow
arborint wrote:
sparrrow wrote:... yet a flat rounded number may make it too easy for someone to determine how many web orders you've had.
If your criterion is to have a starting number that makes it difficult for someone to "determine how many web orders you've had" (or perhaps give the impression that you have a lot of orders ;)) then pick a number that makes you happy. There is no technical reason for this, so follow your heart! ;)
What would YOU do though? I'm not looking for advice; just curious to know how other people approach this. :)

PCSpectra, my reason for not wanting users to know how many orders I've had is the same reason eBay has a feedback score for users. You have less faith in a user with low feedback, and I don't want a brand new web shop that I create to give that vibe.

Re: Where would you start your order number iteration at?

Posted: Wed Feb 18, 2009 6:18 pm
by josh
You can set the auto increment value to, say 40234 and let it count by 1 from there on out, generally they won't see the id till after they pay tho

Re: Where would you start your order number iteration at?

Posted: Wed Feb 18, 2009 7:04 pm
by André D
I often use 1000 as the start of auto-incrementing values that are visible to customers. When you launch a new system and haven't had many orders yet, telling a customer "Your order number is 1006" looks better to me than "Your order number is 6." It's purely cosmetic.

Re: Where would you start your order number iteration at?

Posted: Wed Feb 18, 2009 7:21 pm
by André D
André D wrote:I often use 1000 as the start of auto-incrementing values that are visible to customers. When you launch a new system and haven't had many orders yet, telling a customer "Your order number is 1006" looks better to me than "Your order number is 6." It's purely cosmetic.
As a bonus, you can reserve order numbers 1–999 for internal use, testing, etc. Also, starting at 1000 makes it very easy to casually count how many orders you've taken at a glance.

Re: Where would you start your order number iteration at?

Posted: Wed Feb 18, 2009 7:25 pm
by Benjamin
Just start it at 324596502

Re: Where would you start your order number iteration at?

Posted: Wed Feb 18, 2009 9:20 pm
by Christopher
:)

Re: Where would you start your order number iteration at?

Posted: Thu Feb 19, 2009 3:21 am
by josh
André D wrote: "Your order number is 1006" looks better to me than "Your order number is 6." It's purely cosmetic.
Why not 0006 :D

Re: Where would you start your order number iteration at?

Posted: Fri Feb 20, 2009 10:49 am
by malcolmboston
personally i use time () as my order reference number, this doesnt give out any information regarding total sales 8)

Re: Where would you start your order number iteration at?

Posted: Fri Feb 20, 2009 11:14 am
by josh
But you turn down a customer if the shop is getting more than 1 sale at a time? ( or what happens if order id#s collide, are you sure it is a customer friendly degradation or does your system crash? )

Re: Where would you start your order number iteration at?

Posted: Fri Feb 20, 2009 12:06 pm
by Jenk
We continue to use the same database after release, so the number is going to be as high as whatever it was when testing finished. The data is blanked, but the increment is kept. E.g. one of our systems just started with the ID of 32918 because that is how many test records were created (6 month agile development meant a lot of test data was created)

Re: Where would you start your order number iteration at?

Posted: Fri Feb 20, 2009 12:32 pm
by josh
That only works if your tests don't drop & re-create the tables, but thats a good point. At the end of the day I doubt the order #s are going to hurt anything. Another thing some people do is just prefix the date like instead of 000001, they'd have 20090419-000001 ( 2009 / 04 / 19 ). But you have to ask yourself what it would be like trying to read that # vs the first one?