News:

Support the VirtueMart project and become a member

Main Menu

VM Skip Order Number

Started by toad78, August 23, 2016, 00:12:51 AM

Previous topic - Next topic

toad78

Looking at the VM Orders, I noticed that one order number was skipped (there's no record of the order) and would like know what are the possible causes?

Jörgen

Hello


  • Deleting the order would bee one cause, most likely in my oppinion
  • Migrating and updating the database could could make gaps in the database

There could be other possibilities, like a faulty payment extension that doesn´t handle aborted payments in the right way. But generally this should otherwise only happen when there is a problem with the sql server. Maybe a transaction that has not been completed for some reason.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

toad78

Thank you, Jorgen.

It's just an odd anomaly with know way of knowing what the cause is. Hosting isn't real helpful because they, apparently, don't see any errors on their site that would've caused the skip.

Milbo

The number is created by using count(rows) (in short),
When users cancel a checkout (for example no money on paypal), then the order was already created as pending, so it is very likely that order numbers jump. Invoice numbers should increase by 1 quite accurate.
You can also buy this extension http://extensions.virtuemart.net/shopper-order/automated-numbers-detail , which keeps the incremental in an own table.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

toad78

Thank you, Milbo, for your suggestion.

It just doesn't seem worth it to purchase a plugin like that if the site is functional. I'm just curious as to what would cause the skip in the number. This is the first time it's ever happened.

Maybe this is one of those needle-in-the-haystack situations where there's no solid answer?

Jörgen

Hello

A correctly working payment like paypal increases the order number by one even when cancelling checkout. But there is always an order created, usually with status pending. Otherwise ther would be a malfunction in the code or an server error during the transaction to create this.

Deleting an order makes a hole in the number series and this i to bee the most likely event and my best guess.

Marking the order as deleted instead of actually deleting it would maybe be a better solution, then You can Always see what has happend to the order. A kind of ISO9001 traceability :)

best regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.