Where would you start your order number iteration at?
Moderator: General Moderators
Where would you start your order number iteration at?
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.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Where would you start your order number iteration at?
Start at one as it's the default auto-increment number provided by MySQL. Random introduces potential collision, requiring a re-attempt.What number do you start your order number auto-increment at? and why?
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>';
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Where would you start your order number iteration at?
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 orderssparrrow wrote:... yet a flat rounded number may make it too easy for someone to determine how many web orders you've had.
(#10850)
Re: Where would you start your order number iteration at?
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?
What would YOU do though? I'm not looking for advice; just curious to know how other people approach this.arborint wrote: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 orderssparrrow wrote:... yet a flat rounded number may make it too easy for someone to determine how many web orders you've had.) then pick a number that makes you happy. There is no technical reason for this, so follow your heart!
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?
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?
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?
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.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.
Re: Where would you start your order number iteration at?
Just start it at 324596502
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Where would you start your order number iteration at?
Why not 0006André D wrote: "Your order number is 1006" looks better to me than "Your order number is 6." It's purely cosmetic.
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
Re: Where would you start your order number iteration at?
personally i use time () as my order reference number, this doesnt give out any information regarding total sales 
Re: Where would you start your order number iteration at?
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?
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?
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?