The coupon generator plugin is a basic serial generator.
It allow you to specify a serial format in his own syntax.
Parameters of the plugin
Name - The name for the generator. This name is only display in the backend and users won't see it.
Published - Does the generator could be use, or not.
Discount coupon id - This is a identifier of the template coupon.
Variable discount - If not empty, it would override the coupon flat amount by the percentage of the linked product price.
Discount validity period - The override of the coupon validity. If 0, no override.
Serial Size - This is a value which could be used in the serial format.
Serial Format - The format for the serial (see the serial format syntax)
Serial Examples - HikaSerial would display some serial examples for the last saved format.
Coupon template
The Discount coupon id is the id of the HikaShop coupon that would be used as template.
Your coupon have to be unpublished. When the plugin would duplicate the coupon, it would automatically published it (and set the "used times" to zero).
Serial format syntax
The default format is [a-zA-Z0-9]{size}.
The format is composed of defined characters, random characters and variables.
For the moment, there is not a lot of variables which could be used but with the time, some parameters would appear.
When you can to have random characters, you have to use brackets []
- [a-z] would display one character between "a" (lowercase) and "z" (lowercase).
- [a-e] would display one character between "a" (lowercase) and "e" (lowercase).
- [0-9] would display one digit (number).
- [a-zA-Z] would display one character between "a" and "z" (lowercase or upercase).
- [0-9]{3} would display three digits (number).
- [aeiouy@#] would display one character from the list: a, e, i , o, u, y , "@", "#".
- [a-z]{size} would display several characters depending the value of the "serial size".
Some serial format examples:
- [a-z]{size}-[0-9]{size}-[a-z]{size}
- [A-Z]{2}[ABCDEFGHKLMNPQRSTUVXYZ0-9]{size}