Jump to content



Latest News: (loading..)

- - - - -

Devising an order number?

oid order number

  • Please log in to reply
10 replies to this topic

#1   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 28 June 2012 - 09:11 AM

I've been thinking about how the order number appears to the customer.

As you know when a customer places an order that order is given an idea in the database (in simple terms). That number begins at 1 and multiplies by 1 as each order is placed.

Personally I think that makes the shop feel a little small-time... "Oh, I'm only the 23rd person to buy anything from this shop....hope they are legit!".

Therefore I was thinking of concocting a more complex order ID for the shop that I am working on. Something along the lines of a letter string like the first three letters of the month, the year then the order ID. Although I might run into some issues maintaining this wherever it's required.

So I'm curious; What have others done in the past? Happy with the default method employed in OSCommerce? Never even considered it?

Genuinely interested in your views :)

#2   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 28 June 2012 - 09:21 AM

Had a thought... Maybe the order number should be unique to each customer based upon their name or item ordered?

I also found this contribution for the previous version of OS Commerce http://addons.oscommerce.com/info/4732

Edited by AndrewRavenwood, 28 June 2012 - 09:24 AM.


#3   Mort-lemur

Mort-lemur
  • Members
  • 1,197 posts
  • Real Name:Heather
  • Gender:Female
  • Location:UK

Posted 28 June 2012 - 11:22 AM

@AndrewRavenwood

Hi,

Personally I think that may cause problems, for instance I know that a certain order number came in a certain month, and they run sequentially, so the higher the order number the more recent the order. - also check with whatever payment processor you use to ensure that there is no format or size limit to the order number field.

If you are concerned about starting at order #1 then run an sql command against the database to set the starting order number at whatever you want eg 998776.
Now my store is the way I want it - Secure, working well, and good Google Ranks - Thanks to all for the help given.

If you want to see the mods I have installed, then see my profile.

#4   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,401 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 28 June 2012 - 12:50 PM

Other option would be, you leave the database alone and add a random dummy number, or a date etc combination in front of the real order number, at places it display to the customer, eg email, order history etc so you have then 123456789 - 5 and 5 is the real oscommerce order number

#5   Juto

Juto
  • Members
  • 369 posts
  • Real Name:Sara
  • Gender:Female

Posted 28 June 2012 - 03:17 PM

Hi, based on that:

1) The tax authorities in most countries require a consequetive numbering system

2) Consumers, by law, have the right to return goods within a given time limit

3) Goods are often given guarantees with a time limit

Based on that I suggest the following order numbering system:

YYYY-mm-dd-hh-order id, where order id is a three digit consequetive order number.

So, an order number 4 placed today at 6 in the morning would have the number: 2012-06-27-06-004
and an order number 5 placed at 6 in the evening would have the number: 2012-06-27-18-005

This numbering system is also a peace of cake to use in an accounting system and, excel.

So, George or anybody with a coding skill... Go ahead! :)

Sara

#6   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,401 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 28 June 2012 - 03:30 PM

Sara, I think that this is what the addon that @AndrewRavenwood found does about

#7   knifeman

knifeman
  • Members
  • 1,676 posts
  • Real Name:Tim
  • Gender:Male

Posted 28 June 2012 - 03:32 PM

I installed 'scrambled order number' years ago. it alters the order number to one like this= ABC-123456789
The original order number as well as the scrambled number are viewable in admin, but not on the catalog side.

Another one I liked adds a random number to each consecutive order. 'order number booster' The range that the random number is pulled from is adjustable.
So... When you shop first starts out, add a large number to each order and as you get busier, decrease the amount added to the number to suit your taste.

Not sure if either is compatible with 2.3.

Tim

#8   MrPhil

MrPhil
  • Members
  • 4,147 posts
  • Real Name:Phil
  • Gender:Male

Posted 28 June 2012 - 03:55 PM

Quote

as you get busier, decrease the amount added to the number to suit your taste.

Then you are in danger of duplicating (overlapping) order numbers. It also may violate any legal requirements for consecutive order numbers.

If you don't want your customer to see they are order 1, the best approach is to simply add a constant, fixed, amount, e.g., 39453 + 1. By the time that gets to overflowing a 32 bit integer (2.1 billion) you'll be long gone. I don't see any need to show the date and time in an order number -- that's available elsewhere. Adjusting the auto_increment counter in MySQL to start at 39454 is another possibility, but be sure to check if transferring to a new database (or restoring a backup) brings along the old counter.

#9   knifeman

knifeman
  • Members
  • 1,676 posts
  • Real Name:Tim
  • Gender:Male

Posted 28 June 2012 - 04:21 PM

View PostMrPhil, on 28 June 2012 - 03:55 PM, said:

Then you are in danger of duplicating (overlapping) order numbers. It also may violate any legal requirements for consecutive order numbers.


I guess i did not explain it clearly enough.
Order number booster, adds a random number to the order number. So instead of auto increment by one, it increments by some random number you set in the add on. No chance of overlap and all numbers are consectutive, just not all numbers are used.

#10   Juto

Juto
  • Members
  • 369 posts
  • Real Name:Sara
  • Gender:Female

Posted 28 June 2012 - 08:38 PM

Hi George, yes it does...almost: The order number is missing the order id. I might have a look at that contribution to see how it can be modified.

Sara

#11   AndrewRavenwood

AndrewRavenwood
  • Members
  • 54 posts
  • Real Name:Andrew
  • Gender:Male

Posted 29 June 2012 - 08:54 AM

@multimixer The idea of presenting a dummy order number is definitely something that I considered and am still considering it's only potential drawback may be that it will take a bit of work to ensure that all the auto emails also produce the same numbers.
@Juto I did consider using that contribution but I have to admit that having had a rotten time integrating paypal recently I didn't want to upset the applecart!
@Mort-lemur I think that bumping the numbering up could well be a good idea and one that I didn't consider.





Also tagged with one or more of these keywords: oid, order number