VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: toad78 on August 23, 2016, 00:12:51 AM

Title: VM Skip Order Number
Post by: toad78 on August 23, 2016, 00:12:51 AM
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?
Title: Re: VM Skip Order Number
Post by: Jörgen on August 23, 2016, 10:49:28 AM
Hello


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
Title: Re: VM Skip Order Number
Post by: toad78 on August 23, 2016, 18:48:58 PM
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.
Title: Re: VM Skip Order Number
Post by: Milbo on August 23, 2016, 20:40:01 PM
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.
Title: Re: VM Skip Order Number
Post by: toad78 on August 23, 2016, 20:45:00 PM
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?
Title: Re: VM Skip Order Number
Post by: Jörgen on August 24, 2016, 07:40:30 AM
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