Coupon code generator this is php class, which provides the ability to generate coupon codes on various parameters. Its key feature is the generation of a coupon code on a mask like this “XXXXXX” or “prefix-XXXX-XXXX-suffix” where ‘X’ – random symbol, ‘-’ – custom separator.
HTML, CSS, JS, PHP
- Support prefix- and –suffix
- Support any coupon mask
- Support all numbers, alphabets, symbols
- Support different lenghts
- Generate N number of coupons
- Simple Portal
- Export codes to excel sheet
$coupon_code_options = array(</code><br/>
'prefix' => '',</code><br/>
'suffix' => '',</code><br/>
'length' => 10,</code><br/>
'letters' => false,</code><br/>
'numbers' => true</code><br/>
);
$coupon_code = SubStacks\SMS_Marketing\Coupon::generate_coupons($coupon_code_options);
- Dynamic length
coupon::generate(8); // J5BST6NQ
- Using prefix
coupon::generate(6, ”XYZ-”); // XYZ-NT163E
- Using suffix
coupon::generate(6, ”XYZ-”, “-ABC”); // XYZ-TC2MSD-ABC
- Without numbers
coupon::generate(6, ””, ””, false); // LNTDRS
- Without letters
coupon::generate(6, ””, ””, true, false); // 835710
- With symbols
coupon::generate(6, ””, ””, true, true, true); // #H5&S!7
- Random register (includes lower and uppercase)
coupon::generate(6, ””, ””, true, true, false, true); // aT4hB2
- With custom Mask (Note: length does not matter)
coupon::generate(1, ””, ””, true, true, false, false, “XXXXXX”); // STG6N8
Simple PHP Coupon Code Generator is licensed under the WTFPL license.