R6 order number gaps possible?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

R6 order number gaps possible?

Post by AbleMods » Thu Nov 07, 2013 8:39 pm

I didn't think it was possible to have a gap in order numbers in Able Gold?

We're seeing several 1-number gaps, but also some 3 and 4 number gaps.

How? Could it be a SQL transaction rollback and/or some sort of checkout retry perhaps ??
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: R6 order number gaps possible?

Post by ForumsAdmin » Fri Nov 08, 2013 12:45 am

There was a feature added in AC Gold, on popular demand, that an order should only be created if the payment is successful. In AC7 an order was always created irrespective of the payment status.

Now in order to support this feature, order creation was deffered, however, since the payment gateways require a reference order number, an order number has to be generated before attempting the payment. Now if the payment fails, the order is not created, but the next order number was already created. It is important to note that this order number has to be created in a separate transaction outside the main 'checkout' transaction. Therefore, everything else does roll back, but the generated order number can't. If the order number is also generated inside the main checkout transaction, the transaction span will become extremely long and it will block all other waiting orders on a busy site.

AC Gold currently has two options.
1. Allow checkout with failed payments and have no missing order numbers
Or
2. Disallow checkout with failed payments and leave possibility of missing order numbers.

A merchant can configure between the two. Go to Configure -> Store -> General : Checkout Settings and enable the "Ignore Failed Payments" checkbox.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: R6 order number gaps possible?

Post by AbleMods » Fri Nov 08, 2013 5:28 am

ForumsAdmin wrote:It is important to note that this order number has to be created in a separate transaction outside the main 'checkout' transaction. Therefore, everything else does roll back, but the generated order number can't.
That makes complete sense. Thank you for the detailed explanation.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply