Accessing Coupons
Navigate to Marketing > Coupons in your admin panel to view and manage all your discount coupons.Creating a New Coupon
Enter Basic Information
Fill in the required coupon details:
- Coupon Name: Internal name for your reference (3-128 characters)
- Code: The code customers will enter at checkout (3-20 characters)
- Discount Type: Choose between Fixed Amount or Percentage
- Discount Value: Enter the discount amount or percentage
Configure Restrictions
Set optional restrictions to control how the coupon can be used:
- Minimum Order Total: Require a minimum cart value
- Logged In Customers Only: Restrict to registered users
- Free Shipping: Enable free shipping with this coupon
Set Usage Limits
Control how many times the coupon can be used:
- Total Uses: Maximum number of times the coupon can be used overall
- Uses Per Customer: Limit how many times each customer can use it
Define Validity Period
Set the date range when the coupon is active:
- Start Date: When the coupon becomes valid
- End Date: When the coupon expires
Select Products or Categories (Optional)
Restrict the coupon to specific products or categories. Leave empty to apply to all products.
Coupon Types
Fixed Amount Discount
Fixed Amount Discount
Provides a specific dollar/currency amount off the order total.Example: Create a coupon with code
SAVE20 that gives 100.Percentage Discount
Percentage Discount
Provides a percentage off the order total or qualifying products.Example: Create a 15% off coupon for new customers.
Product-Specific Coupons
Product-Specific Coupons
Restrict coupons to specific products or categories.Example: 10% off electronics category.
Managing Coupons
Enabling or Disabling Coupons
You can quickly enable or disable multiple coupons without deleting them:- Select the coupons using the checkboxes
- Click Enable or Disable in the toolbar
- Disabled coupons cannot be used by customers but remain in your system
Disabling a coupon is useful for temporarily pausing a promotion without losing the coupon configuration.
Viewing Coupon Usage History
Track how your coupons are being used:- Click Edit on any coupon
- Navigate to the History tab
- View details including:
- Order ID
- Customer name
- Discount amount applied
- Date used
Practical Examples
Example 1: Flash Sale Coupon
Create a 24-hour flash sale with 25% off:- Name: “24-Hour Flash Sale”
- Code: “FLASH25”
- Type: Percentage
- Discount: 25%
- Start Date: Today at 00:00
- End Date: Today at 23:59
- Uses Total: 100 (create urgency)
- Status: Enabled
Example 2: Free Shipping Coupon
Offer free shipping on orders over $50:- Name: “Free Shipping”
- Code: “FREESHIP”
- Type: Fixed Amount
- Discount: 0.00
- Minimum Total: 50.00
- Free Shipping: Yes
- Status: Enabled
Example 3: Loyalty Reward Coupon
Reward repeat customers with $10 off:- Name: “Loyal Customer Reward”
- Code: “LOYAL10”
- Type: Fixed Amount
- Discount: 10.00
- Logged In Only: Yes
- Uses Per Customer: 1
- Status: Enabled
Best Practices
- Clear Naming: Use descriptive internal names to easily identify coupons
- Simple Codes: Create memorable coupon codes that are easy to type
- Set Expiration Dates: Always define start and end dates to create urgency
- Monitor Usage: Review the history tab to track performance
- Limit Abuse: Use per-customer limits to prevent coupon abuse
- Test Before Launch: Create a test order to verify the coupon works correctly
Coupon codes are case-sensitive in OpenCart. Consider using uppercase letters for consistency.
Technical Reference
Database Structure
Coupons are stored in theoc_coupon table with the following key fields:
coupon_id: Primary keyname: Internal coupon namecode: Customer-facing coupon codetype: ‘F’ for fixed amount, ‘P’ for percentagediscount: Discount valuetotal: Minimum order total requiredlogged: Require customer login (0 or 1)shipping: Enable free shipping (0 or 1)date_start: Validity start datedate_end: Validity end dateuses_total: Maximum total usesuses_customer: Maximum uses per customerstatus: Coupon status (0 or 1)
Model Methods
Key methods in/upload/admin/model/marketing/coupon.php:
addCoupon($data): Create new couponeditCoupon($coupon_id, $data): Update existing coupondeleteCoupon($coupon_id): Remove coupongetCoupon($coupon_id): Retrieve coupon detailsgetCouponByCode($code): Find coupon by codegetHistories($coupon_id): Get usage history
Controller Location
- Admin Controller:
/upload/admin/controller/marketing/coupon.php - Admin Model:
/upload/admin/model/marketing/coupon.php
Troubleshooting
Coupon code not working at checkout
Coupon code not working at checkout
Possible causes:
- Coupon is disabled (check Status field)
- Current date is outside the validity period
- Minimum order total not met
- Usage limit reached
- Customer not logged in (if required)
- Products in cart are excluded from the coupon
Cannot delete a coupon
Cannot delete a coupon
Cause: The coupon may have historical usage data.Solution: Disable the coupon instead of deleting it to preserve history records.
Coupon gives wrong discount amount
Coupon gives wrong discount amount
Check:
- Verify the Type field (Fixed vs Percentage)
- Ensure discount value is entered correctly
- Check if product/category restrictions are applied

