Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Ordernumbers for Magento

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:

Reset the counter every year 02 Sep 2015 19:43 #1

  • konafets
  • konafets's Avatar Topic Author
Hi,

what I have to do to create an counter which resets every year? I like to have an numbers like 150902-1, 150902-2, 150904-3, 160101-1.
It should not matter if the order comes from the english store view or another one.

Currently I have the following format:
Format: RE-WS-[year2][month][day]-#
Scope: Use same counter for all countries
Reset counter: One new counter per year

Is that the correct config?

Regards
Stefano

Reset the counter every year 03 Sep 2015 18:17 #2

Dear Stefano,
Yes, these settings look correct to me. Do you have any issues with these settings?

Best regards,
Reinhold

Reset the counter every year 07 Sep 2015 18:25 #3

  • konafets
  • konafets's Avatar Topic Author
Hey,

first of all I don't understand why there are multiple entries for the same kind like invoice or order as you can see in Screenshot #1. Some are counting up, some stay at 1 and some have no counter name.

Second the counter increases in a non-logical way as you can see in screenshot #2. Every new day the counter resets but starts with a higher number.

Best regards,
Stefano
Attachments:

Reset the counter every year 13 Sep 2015 22:55 #4

Dear Stefano,
What are your exact settings for the extension? To me it seems like several of the counters were created automatically during a testing phase. To me it appears that you changed the counter setting from "format-specific counter" to "global counter" on Sept 3 or 4. The current counter values are in line with such a config change.

Regarding the counter names:
- Global counters have no name (they are global, so there is no need to distinguish them).
- Format-specific counters have the name of format with all variables replaced by their values.

For more insight on the counter naming, the following section (for the ordernumber plugin for VirtueMart, but that plugin uses the exact same logic as the Magento extension) might give you some more information:
open-tools.net/documentation/ordernumber...at_specific_counters

Regarding your questions:

1) The counters named "RE-WS-150813-#" and "RE-WS-150903-#" seem to come from your tests, before you changed the counter to global. A format-specific counter on Aug. 13 uses "RE-WS-150813-#" as its counter name, and on Sept. 3 it uses "RE-WS-150903-#" as counter name. Clearly, once that day has passed, the counter will never be increased any more.
After you switched to a global counter, the counter that is now actually used is the unnamed counter in the second row (with value 6).

2) If you look at your invoice numbers, starting on Sept 5, the numbers are increasing as expected. So I would guess that there was some config change (from format-specific counter to global counter) between the test orders on Sept 3 and the test orders on Sept 5...

Without knowing the exact configuration, it's hard to give secure advice, which counters are not needed any more and can deleted... About half of the existing counters can be deleted, but without further information I hesitate to give instructions which of the counters are no longer required.

Judging from the test orders on Sept 5 and 7, I would say that the counter properly increases with the current settings, but those old orders are not increasing as expected due to config changes.

Best regards,
Reinhold
  • Page:
  • 1