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:

invoice number doesn't change 02 Apr 2014 16:36 #1

  • marceff
  • marceff's Avatar Topic Author
I have set invoice number to yaer/orderNumber/# but number stay always to 01, it doesn't change to 02, 03... Can you help me to solve the problem?

invoice number doesn't change 15 Apr 2014 10:41 #2

  • frauweb
  • frauweb's Avatar
I have the same problem with:
Virtuemart version 2.0.20b, Joomla version 2.5.19 and VM2 - Custom Order, Invoice and Customer Number plugin version 1.8.0.

invoice number doesn't change 18 Apr 2014 16:10 #3

Can you look into the database, table "j25_virtuemart_shopper_plg_ordernumber" (the j25 prefix might be something different on your server) and check what the line with number_format "yaer/orderNumber/#" says. Does that table have an entry for this format?

If not then the problem appears to be that the plugin is unable to write the current counter to the database, so the next order cannot count up from the last number...

Do you see any warnings/errors in your web server logs?

Which version of PHP and mysql are you using on the server?

Best regards,
Reinhold

invoice number doesn't change 18 Apr 2014 16:18 #4

  • marceff
  • marceff's Avatar Topic Author
PHP 5.3.10 - DB 5:5:35-0ubunto0.12.04.2
It shows no error/warning message, just stays on #1.
I will check db tab, then what should I do?

invoice number doesn't change 04 May 2014 00:14 #5

If you can take a look at the mysql database and check whether that database table XXX_virtuemart_shopper_plg_ordernumber contains any entries (and if so, what are their exact values). That is the first big step to track down the area of your problem.

If you want, I can also take a look at your site and the settings of the plugin and of VirtueMart. Maybe I can spot the cause of the problem. Do you have a test site available where the problem can be reproduced?

Best regards,
Reinhold

invoice number doesn't change 04 May 2014 15:32 #6

  • marceff
  • marceff's Avatar Topic Author
Thanks for replay. Please find the attached screenshot of DB tables, as you can see there are 12 invoice. Hope you're able to understand whats is causing the problem.
Attachments:

invoice number doesn't change 04 May 2014 19:56 #7

Ah, thanks for the screenshot. I can now see what the "problem" is: You are using the order number in the invoice number format. Since each order will have a different order number, the invoice number format will be different for each invoice and thus the counter will start from 1.

To make this clearer, let's look at an example. Suppose you have orders with order numbers "Order-01", "Order-02", etc. and the invoice number format "[year]/[orderNumber]/#".

First order:
  1. The plugin will replace all [...] variables in the format with the current values. This results in a format string "2014/Order-01/#".
  2. The plugin will check the database whether a counter for "2014/Order-01/#" already exists.
  3. Since there is no counter in the database yet, the plugin will use a counter value of 1
  4. The plugin will insert the counter value in the format string, resulting in "2014/Order-01/1"
  5. The plugin will write the counter value 1 for the format "2014/Order-01/#" to the database

Second order:
Will be exactly the same, since the order number is "Order-02", the plugin will look for a counter named "2014/Order-02/#". As this does not exist yet, it will use a counter value of 1.


You might want to use a global invoice number counter (rather than "Separate counter per format value"). This will cause the plugin to always look up the counter named "#" from the database in the second and fifth step above.

Best regards,
Reinhold

invoice number doesn't change 05 May 2014 10:04 #8

  • marceff
  • marceff's Avatar Topic Author
Thanks Reinhold it seems to work properly now, "Separate counter per format value" has to be checked twice (there are two of those).
To start counter back to number 1, should I delete data invoice from DB table, or there is a way to do it from plug in?

invoice number doesn't change 05 May 2014 23:33 #9

There is no way from the plugin (because it is a pure Joomla plugin, there is no way to execute code in the configuration page). You'll have to modify the database directly.

See the FAQ of the plugin for some help how to do it:
open-tools.net/documentation/ordernumber...irtuemart.html?id=41

Best regards,
Reinhold
  • Page:
  • 1