Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Advanced Ordernumbers for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Missing order numbers... 18 Dec 2017 13:09 #1

  • webface
  • webface's Avatar Topic Author
Hi,
Its very strange, but the order number increase not following the virtuemart_order_id sequence, as you can see the attached picture. Why is this?
Attachments:

Missing order numbers... 28 Dec 2017 01:00 #2

Dear webface,
Sorry to hear about this issue.
This should actually never happen, and I don't have an immediate explanation for it.
Was this the first time an invoice number was skipped?

Was there anything special about the orders 804 and/or 805? The only difference I can see from the database screenshot is that the 804 order has a custom customer number assigned (i.e. one that does NOT start with nonreg_). But I have no idea whether this can be related to the issue.

Could you please also tell me the versions of (a) our plugin, (b) VirtueMart, (c) Joomla and (d) PHP that you have installed?

Best regards,
Reinhold

Missing order numbers... 28 Dec 2017 07:37 #3

  • webface
  • webface's Avatar Topic Author
Dear Reinhold,
Thanks for your reply.
No, it isn't the first time, when i experienced this issue.
There isn't any special about orders 804 and 805, except that is 804 was a registered user, and 805 was a guest customer.
The plugin version is: 4.0.6, Virtuemart: 3.0.18, Joomla: 3.7.5, and php is: 5.6.27-0+deb8u1.
Thanks and regards,
Laci

Missing order numbers... 31 Dec 2017 18:54 #4

Dear Laci,
Thank you for the version numbers.
First, VM 3.0.18 is quite old and there have been some security fixes since. I would recommend updating to the latest version of VM 3.2.12 and Joomla 3.8.3.
Having said that, the jumps in the numbers cannot be explained by old versions of VM.

I have looked again at the code and though about possible scenarios, where either the function that generates the order numbers is called twice (this could only be the case if VirtueMart is creating the same order twice) or the counter configuration is wrongly parsed with an increment of 2 instead of 1 (as the order number format is always the same, I see no reason why PHP should for some orders wrongly extract the counter patterm from the format).

What is your exact configurtion of the ordernumber plugin? Do you use custom variables to override the ordernumber_format? Or do you use a custom increment in the counter (e.g. [#/10:3])?

To figure out why the counter jumps, I think the most promising approach is to look at all orders where the counter jumped and figure out what sets them off from all other orders. Some ideas:
1. Where these orders at more or less the same time as the preceeding or next order (i.e. a so-called race condition might have happened, where one order increased the counter while the other tried to do it at the same time)
2. Are the order with the jumps always from registered users? Do you have some special handling of certain joomla user groups or VM shopper groups?
3. Do you have any other plugins installed that might mess with the order at the time it is created (e.g. a One-Page checkout plugin, a third-party invoice plugin, etc.)?

If you feel comfortable giving a stranger like me access to your Joomla/VM backend, I can offer to take a look myself. In that case, please send access credentials to office@open-tools.net. Otherwise, we'll try to figure it out by some more questions like the above.

Best regards,
Reinhold

Missing order numbers... 03 Jan 2018 16:52 #5

  • webface
  • webface's Avatar Topic Author
Dear Reinhold,
Thanks for your help!
Yes, i know that the Joomla and VM are quite old, but unfortunatelly the template doesn't compatible the new versions of these...:/
My ordernumber format in the plugin is: OT[year]-#
About your ideas:
1: The orders, where i can see the "jump", isn't too close in time.
2: No, the jumps are random, both of registered/unregistered users. We haven't any special joomla or VM groups.
3: Yes, we have installed Rupostel OPC component and plugin, but we don't use they custom invoice number plugin.
Thanks for your offer about the access, i will send you in email, but please be careful, because the site is an active webshop.
Thanks for your help!
Laci

Missing order numbers... 07 Jan 2018 01:37 #6

Dear Laci,
Thank you for the access to your site. I figured out what sets those order with jumps in the order number apart from all other orders: All of them have the "Pending" status set at multiple different times, i.e. VirtueMart executes the code to generate the order multiple times, and as part of that it calls our plugin multiple times to create a new order number.

I have no idea why VM initialized the order multiple times, though. However, I'll send you an updated test version of the plugin, where I simply add another check and create a new ordernumber only when the order does not have any order number set yet. Could you please install that version and check if the jumps still happen?
As I cannot reproduce the case where an order is set to pending multiple times, I don't know whether VirtueMart actually stores the first order number or not. If it stores and preserves the first assigned order number, then my fix should solve your issue and the first assigned number will never be overwritten by new calls to the pending functionality. If not, then I really don't know what our plugin can do, as it seems to be an issue in the VirtueMart core code.

Best regards,
Reinhold

Missing order numbers... 07 Jan 2018 08:03 #7

  • webface
  • webface's Avatar Topic Author
Dear Reinhold,
I am very grateful for your excellent customer support!
I’ve installed the new version of the AON which you sent.
As you can suggest, I will contact you a few weeks later with the result.
Thanks again,
Laci

Missing order numbers... 24 Jul 2018 08:27 #8

  • avexa
  • avexa's Avatar
I have the same issue. I have old version of number plugin (version 3.6), number of order is creating even when no new order is created - for example user submit order (order 1-111 is created), go to paypal gateway, user cancel paypal and go back and submit with another payment (order 1-112 is created). Is it already repaired in any newer version? Please confirm, I can buy a new version. Thank you for information.

Missing order numbers... 24 Aug 2018 02:08 #9

Dear Avexa,
The behavior you observe is actually the way VirtueMart handles orders. Each time you go to PayPal, a new order is generated, so it needs a new order number, even if that order is then left in status "Pending" in the system. There is nothing our plugin can do about this, as this is the behavior of the VM core code.

There are actually plugins out there that give the customer the chance to later on pay for an order that was left pending some time ago.

Best regards,
Reinhold

Missing order numbers... 29 Aug 2018 12:19 #10

  • 4FootyFans
  • 4FootyFans's Avatar
Hello Reinhold
I have v.4.0.6 installed.
For the first time since I first installed the plugin, nearly 5 years years ago, I have expeienced an inexplicable jump in order numbers.
Having reviewed the orders tables, I can confirm there is no break in the various tables id sequence.
As above, the latest order has a Pending status and the customer was paying by PayPal Express.
So, they must have gone to PayPal twice?
With all the downtime PayPal has, for one reason or another, I am surprised this has only happened once.
Best
Eddie

Missing order numbers... 04 Sep 2019 11:56 #11

  • james@dpstech.co.uk
  • james@dpstech.co.uk's Avatar
I'm running Joomla 3.9.11, Virtuemart 3.4.2, Advanced Ordernumbers for VirtueMart 4.0.6 and PHP 7.2 and am experiencing the same skipped VM Order Number issue. Can anyone offer any advice on the fix to this issue please.

Many thanks in advance.

Missing order numbers... 04 Sep 2019 14:01 #12

  • james@dpstech.co.uk
  • james@dpstech.co.uk's Avatar
Hi Laci,

did the fix that Reinhold supply you correct the issue?

If so would you be able to forward the fix on?

thanks

James

Missing order numbers... 07 Jan 2020 17:15 #13

  • thebden
  • thebden's Avatar
Any chance I can get a copy with the updated code as experiencing exactly the same issue.
  • Page:
  • 1