Custom number formats - fill automatically shopper fields as displayed name, login name or password for registration process. Allows customisation of customer, invoice and order numbers by self defined formats.
Installation
- Go in the menu Extensions > Entension Manager, and install the plugin
- Go in the Extensions > Plug-in Manager, and enable the plugin named Automated Numbers
Configuration
For plugin configuration browse VirtueMart > Configuration > Automated Numbers
Now you find fields available to use for automated numbers instead system or shopper input fields.
Below is one example to show how to plugin configuration works.
- Username - the shoppers account username
- Name - the shoppers name
- Password - account passwort
- Shopper number - system vm shopper number
- Invoice number - vm invoice number
- Order number - vm order number
You can use different operations to format your numbers. The amount of chars determines how many chars are generated.
- Random char e.g. [RRRRR] random five character string, e.g. y98§$
- Human readable random char [HHHHHH] improved random string for better human reading, length six chars e.g. zmak12
- Consecutive numbering [###] incremetal number length three chars e.g. 001
- D date format following php standarts e.g. d:Y creates year, use :c and the date format automatically creates a new counter.
Attention: You muse use different formats in the fields, else the system throws a fatal error for doubled used key.
Basic example incremental order number 5-digits
1. Image - please select "Modify order number" Order number format
We require a 5 digit number incrementally starting with 00001
2. Image - create test order to see how the plugin works with this config.
3. Image - at the bottom of plugin configuration counter area select "Order" and press "Go". Any different format creates a key which has a counter.
Your in step 2. created counter will show.
4. Image - click on the name of the counter to browse the counter details.
In the details you can change the counter to start with specific number.
(Advanced users watch #__virtuemart_extended_plg_istraxx_anumbers)
5. Image - test your order again. The result order number will be counter+1. You can edit this counter, by just clicking the name of key in the key list below. So if you want e.g. 123456 set the counter initially to 123455
Another possibility is to use system variables to modify and extend by counters, e.g. {last_name}, {first_name:1}. would create Doe, J. (assuming John Doe was entered).
You can access by {} any key in the 'data' array of VirtueMart or any stored operator. In case you want to automate the loginname, consider that these names must be unique. A good method is to add a counter and some randoms. For example {last_name:3}[#][RR].
More examples:
{last_name:1}.{first_name:2}[HH] creates for John Doe => D.Jodk or D.Jowz
with a monthly counter:
[d:m:c]{last_name:1}.{first_name:2}[##] creates for the first customer of the month march John Doe => 3D.Jo01 for the second customer, for example for Frank Noe =>3N.No02