sgravelle
Hi Serge!
Yes, we used SQL queries on the table mentioned by Pankaj.
First we created a coupon with all the correct values using the standard procedure (in the Admin panel of Guru), and then we copied all those from the table, and then proceeded to change those values that we needed, and created new SQL queries with those.
In our case the SQL query ended up looking like this:
INSERT INTO `XXX_guru_promos` (`title`, `code`, `codelimit`, `codeused`, `discount`, `codestart`, `codeend`, `forexisting`, `published`, `typediscount`, `courses_ids`) VALUES ('Coupon Code A', 'COUPON-A', '1', '0', '100', '2019-12-18 00:00:00', '2021-01-01 00:00:00', '0', '1', '1', '5||10'),('Coupon Code B', 'COUPON-B', '1', '0', '100', '2019-12-18 00:00:00', '2021-01-01 00:00:00', '0', '1', '1', '5||10')
Here you just need to change the table name to yours (the XXX prefix), and then set the values as needed.
You can keep adding ('Coupon Code B', 'COUPON-B', '1', '0', '100', '2019-12-18 00:00:00', '2021-01-01 00:00:00', '0', '1', '1', '5||10') elements as you need, just separate them with a comma. We were adding 25 coupons with each query.
BTW, please note the first part of the query uses inverted accents to separate the values (name of table, title, code, etc.), but then the second part of the query uses straight or vertical ones (Coupon Code A, etc.). Otherwise the query will throw an error, at least in the PHP MyAdmin version we were using.
Hope this helps!
Best,
Roger.