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!



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


There is no order 17 Dec 2017 11:07 #1

  • tempocrea
  • tempocrea's Avatar Topic Author
Good, I've seen that the number of invoices does not follow an order, sometimes you can give 94 for example, then 99, then 96, then 91 ...

There is no order 28 Dec 2017 16:52 #2

Dear Tempocrea,
Sorry for the late reply, but the holidays are taking their toll.
There are some possible explanations for the phenomenon you are observing:

1. VirtueMart does not automatically create and assign an invoice number when a new order is created. Invoice numbers are only created when the invoice is actually generated. Depending on your particular configuration, VirtueMart might defer invoice generation until payment confirmations are received, or it might be configured not to create invoices automatically at all. In the latter case, invoices are numbered in the order you are manually creating them in the Joomla/VM backend by clicking on the invoice icon (which forces invoice creation if no invoice exists). If your payment method takes some time for your customers to enter all required information and then some more time to confirm payments electronically, it might happen that later orders are complete and invoices are created before earlier orders. Order numbers, on the other hand, are generated as soon as the checkout process is finished, before the redirection to payment methods is done.
All this is done by VirtueMart itself and not by our plugin. Our plugin simply generates a new invoice number, whenever VirtueMart asks it to.

2. If you have made test orders / invoices and deleted the orders in the VM backend, the associated invoices and their invoice numbers are NOT automatically deleted from the database by VirtueMart. You'll have to manually delete all invoice information from the VirtueMart tables in your database. See Question 3 of our FAQ (open-tools.net/documentation/ordernumber...ordernumber-faq.html).
If you delete orders, but not the corresponding invoices from the database, and you create new orders with order numbers of deleted orders, then the invoice numbers of the deleted orders WILL be reused automatically by VirtueMart. Again, this is done by the VirtueMart core code, without our plugin being involved. If VM detects an invoice for an order has already been generated in the past (even if it was for a deleted order), VM will automatically reuse that invoice number and never try to create a new invoice number from our plugin.

3. If it is none of the above, there might either be a timing issue if lots of orders are submitted at the same time (i.e. same fraction of a second). Or, if you use very aggressive caching techniques on your server, they might break proper database table lookup. I'm not aware of any such broken caching method, but there are so many different caching plugins available that there might be a broken one, too.

Best regards,
  • Page:
  • 1