Overview
Code: kv_coupon_codes_pro · Version: 1.0.0 · Works with: OpenCart 4.x and 3.0.x
An OpenCart coupon is one code for everybody: once it is posted on a coupon site the offer is gone, and you cannot tell which newsletter, partner or printed card brought the order. Coupon Codes Pro puts thousands of unique codes behind one coupon. Each code can be used once (or as often as you allow), until its own date, and you see the orders, revenue and discount of every code.
- Batches: pick an OpenCart coupon, say how many codes, choose a prefix and a length. Up to 50,000 codes per step, more later.
- Works like the coupon: the codes take its discount (percent, fixed or free shipping), products, categories, minimum total, dates and the signed-in rule. Change the coupon once, every code follows. Switch it off, every code stops.
- Uses per code: single use by default, or any number, or no limit. A used-up code is refused in the cart. A canceled order gives its use back.
- End date per code: for the whole batch, and later a new date for the unused codes.
- Links: every code has a link that puts it into the cart (
?coupon=CODE on any page of your store), for e-mails, QR codes and partner sites. - CSV export: code, link, state, uses, end date, orders.
- Report: orders, revenue and discount per batch and per code; the latest orders with the code they used.
- Disable and enable one code, or all unused codes of a batch.
| Page | Contents |
|---|
| Installation | Requirements, installing, first steps, updating, removing |
| Configuration | Settings, the coupon behind a batch, license |
| Usage | Making a batch, links, CSV, what shoppers see |
| FAQ | Common questions |
Tested on
| |
|---|
| OpenCart | 4.1.0.4 and 3.0.5.1 |
| PHP | 8.3 with OpenCart 4.1.0.4, 8.1 with OpenCart 3.0.5.1 |
| Checkout | The standard OpenCart checkout of both versions, guest and signed in |
Limits of this version
- Codes have up to 20 characters (prefix included).
- A use counts while the order is in a processing or complete status, as OpenCart counts coupon uses.
- If two shoppers confirm their orders with the last use of a code at the same moment, the second order gets the fraud status you set in OpenCart, exactly as with a used-up OpenCart coupon.
- Third-party checkout extensions that do not use the OpenCart coupon total are not covered.
Installation
Requirements
- OpenCart 4.0.2.0 to 4.1.x, or 3.0.3.8 to 3.0.5.x
- PHP 7.4 or newer
- The OpenCart Coupon order total switched on (Extensions > Order Totals > Coupon)
Install on OpenCart 4
- Go to Extensions > Installer and upload
kv_coupon_codes_pro.ocmod.zip. - Press the install button next to Coupon Codes Pro.
- Go to Extensions > Extensions, choose Modules and install Coupon Codes Pro.
Install on OpenCart 3
- Go to Extensions > Installer and upload
kv_coupon_codes_pro-oc3.ocmod.zip. - Go to Extensions > Modifications and press Refresh.
- Go to Extensions > Extensions, choose Modules and install Coupon Codes Pro.
First steps
- Make a coupon in Marketing > Coupons with the discount you want. Leave Uses Per Coupon at 0, so every code has its own limit.
- Open Marketing > Coupon Codes Pro > New batch, pick that coupon and create the codes.
- Export the CSV and send the codes or their links.
Updating
Upload the new package the same way. Batches, codes and uses stay; the extension brings its tables up to date by itself the next time you open it.
Removing
Uninstalling removes the batches, codes and their use records. Your coupons and orders are not touched.
Configuration
Open Marketing > Coupon Codes Pro > Settings.
| Setting | What it does |
|---|
| Status | Off: batch codes are refused in the cart. Your normal OpenCart coupons keep working. |
| Coupon links | Accept ?coupon=CODE on any store page. Works for batch codes and for normal coupons. |
The coupon behind a batch
Everything about the discount lives in the OpenCart coupon:
| Coupon field | Effect on the codes |
|---|
| Type and discount, free shipping | The discount of every code |
| Products, categories | Which products the discount applies to |
| Total amount | The minimum cart subtotal |
| Customer login | Only signed-in customers can use the codes |
| Date start, date end | The codes work inside these dates only |
| Uses Per Coupon | Counts all codes of the batch together. Leave it at 0. |
| Status | Off stops every code of the batch |
License
Enter your key on the Settings page. The 14-day trial runs without a key. When a license is not valid, batch codes and coupon links do not work in the store. The admin stays open and your batches stay.
Usage
Making a batch
On New batch:
| Field | Meaning |
|---|
| Name | For you: the campaign, partner or mailing |
| Coupon | The OpenCart coupon the codes act as |
| Number of codes | 1 to 50,000 |
| Uses per code | 1 = single use, 0 = no limit |
| Codes work until | Including that day; empty uses the dates of the coupon |
| Prefix | Up to 10 letters, digits or dashes, for example SPRING- |
| Random characters | 4 to 16 |
| Characters | Letters and digits without look-alikes (no 0, O, 1, I, L), letters only, or digits only |
| Link opens | The page the link goes to; empty is the home page |
A code that happens to equal one of your coupon codes is drawn again, so a code always means one thing.
Links
Each code has a link such as https://yourstore.com/index.php?route=checkout/cart&coupon=SPRING-7KQ2MZ. Opening it saves the code for the cart and shows a short message. The code works when the cart meets the coupon rules. Copy link next to a code copies it; the CSV has every link.
Changing codes
On the batch page:
- Add codes to the batch.
- New end date for the unused codes, or for all codes.
- Switch codes off or on: the unused ones, or all.
- Disable or Enable one code, for example a code that was posted online.
Filters show open, used, expired and disabled codes; the search finds a code.
CSV
Export CSV downloads the codes of the current filter: code, link, status, uses, uses_max, expires, orders, last_order.
What shoppers see
- They type the code in the cart, or open its link.
- The cart shows the discount and the code they used.
- A used-up, expired or disabled code gets the normal OpenCart message for a coupon that cannot be used.
FAQ
Do 10,000 codes fill up my coupon list?
No. The codes live in their own table behind one coupon. Marketing > Coupons keeps one row.
What happens when an order is canceled?
The use comes back, as OpenCart does with coupon history. When the order is processed again, it counts again.
Can I stop a code that was posted on a coupon site?
Yes: Disable on that code. The rest keep working.
Do the links work with SEO URLs?
Yes. ?coupon=CODE works on any page of the store.
Is it fast with many codes?
20,000 codes are made in under a second on our test store, and a code is found by its index.
Do you edit core files?
No. It uses events only, without OCMOD.