How Do Order ID Numbers Work?

bushybushy Member
in Bugs & Feature Requests edited November 2008
Hi guys. I got some questions today from a client regarding the order ID numbers that get assigned to FoxyCart orders. He was wondering:

1. Why they have gaps in them (e.g., 1, 23, 45... as opposed to 1, 2, 3).

2. Why, even given the gaps, sometimes an order comes in with a lower number than an order that was received an hour before.

I'm guessing order ID numbers are derived from FC session IDs. That would explain the gaps and the fact that they are sometimes out of sequence (if customer A enters the site first but submits his order after customer B).

The question is, are there alternative ways to generate order numbers? I think the client is less concerned with gaps but is interested in having order IDs reflect the sequence in which orders are actually submitted. He wants to be able to look at two order numbers and know for sure from the numbers which is the most recent.
  • lukeluke FoxyCart Team
    The transaction date is the only way to really know when an order was submitted and we're going to be adding that to the receipt email in the next version. The order number is not specific to just your store, but is really a FoxyCart transaction id. We've threw around the idea in the past of creating custom order numbers per store that would increment just for each store. If that's something you'd be interested in, please vote for it here:

    It could cause us some confusion if we have to track down the details of an order, but it has been asked for in the past, so we recognize the need.
  • bushybushy Member
    edited November 2008
    Hey Luke. the order ID is really the number of orders submitted through all FoxyCart stores. Prolly long term (assuming FC continues to grow, as do the vendors that use it :-) ) that won't scale so well as it will cause big jumps in order IDs for individual stores. I expect stores want to use IDs not just as a unique identifier for individual orders but to track ordering sequences as well (for order fulfillment and reporting purposes). I'll take your suggestion and cast my vote. It's maybe not at the top of my wish list, but it would be very useful.

    BTW, big ups for 4.0. Haven't played with the coupon functionality yet but I'm loving the label/message customizations under the Language option. And fixing the zero shipping bug erased my biggest FC headache.
  • lukeluke FoxyCart Team
    Thanks Bushy. 4.0 was a big deal for us. LOTS of work went into it.

    Yeah, we agree on the order id side of things. We almost built a custom order id per store system back in the day but figured it might be more trouble than it was worth when tracking down issues with FoxyCart customers concerning specific orders. We'll implement something eventually though.

    Our initial thought on it (was probably about two years ago) was to let each store create their own starting number that we would just increment. So, if you want your orders to start at 1000, then you could do just that.

    Thanks for voting. We're liking the user voice thing... though there's a LOT of work to do for sure. :)
  • I just created a store and want to start off with 1000, did you guys ever launch this option?
  • lukeluke FoxyCart Team
    Hey mikewendricks. No, we never did implement it because the request hasn't been voted as a high priority for our customers (yet).
Sign In or Register to comment.