X-Coupon

An Advanced coupon module for opencart

Current Version: 1.0.8

Thank you for purchasing my plugin. If you have any questions that are beyond the scope of this help file, please feel free to email at opencartmart@gmail.com. Thank you so much!

What it is?

X-Coupon is an advanced coupon module that lets you allow to create coupons in more convenient ways along with a lot of additional features.

Installation

Opencart 3.x

  • First-off, unzip the downloaded xcoupon.zip file. You will get another zip file named xcoupon.ocmod.zip
  • Please Go to Admin -> Extensions -> Extension Installer. Upload "xcoupon.ocmod.zip" and click on continue.
  • Now please navigate to Admin -> Extensions -> Module. Now click the `Install` button (button with + icon) located in the row of X-Coupon module.
  • Now please navigate to Admin -> Extensions -> Modification. Now click the `Refresh` button.
  • Congrats! You are done. Now the module is ready to be used.

Opencart 2.x

  • First-off, unzip the downloaded xcoupon.zip file. You will get another zip file named xcoupon.ocmod.zip
  • Please Go to Admin -> Extensions -> Extension Installer. Upload "xcoupon.ocmod.zip" and click on continue.
  • Now please navigate to Admin -> Extensions -> Module. Now click the `Install` button (button with + icon) located in the row of X-Coupon module.
  • Finally, go to Admin -> Extensions -> Modifications and now click on "Refresh" button
  • Congrats! You are done. Now the module is ready to be used.

Configure Your Coupons

Let's create your first coupon group. Please navigate to Extension -> Module. Now click the Edit button that is for the module X-Coupon.


You have now the first screen like the picture below. In the Global setting tab, please change the module status to Enable to activate it. On the left side under the `Global setting` tab, click the plus icon to create a new `Coupon Group`.


Now you have screen like below picture. Enter a coupon name which will be the coupon name while x-coupon generates the coupons. Just below the name, there are several tabs that contains various rules. The tabs are General, Generic Rules, Generic Rules, Coupon Settings and Manage Coupons.


One thing is very important to understand that all rules/options defined for a coupon will be treated as as logical AND mode. Therefore, all the rules must be validated `true` before the coupon shows up.


Click `Save` button to store persistently what's you have done so far. Now you are done. You have just created your first `coupon group` with default settings. Now it is time to generate/add your coupons under this Group.

Available Rules/Options

X-Coupon has a lot of rules or options. As I mentioned earlier, all the rules are going to be treated as logical AND mode. So don't define an unnecessary rule that you don't need.
Here are available options under each tab:

General

This tab contains some basic information including status of this Coupon Group. Simply toggle on/off of status means disabling/enabling all coupons under this Group.

  • Discountable Tax Class: If you want to adjust the taxes of the discount, please select the tax class to be adjusted. By default X-coupon does not detect amount from tax amount, unless you defined a tax class.
  • Status: Enable/Disable this coupon group

Generic Rules

  • Store: Choose applicable stores you want to make coupons valid for.
  • Geo Zone: Choose applicable GEO zone you want to make coupons valid for.
  • Country: Choose applicable countries you want to make coupons valid for.
  • Customer Group: Choose applicable customer groups you want to make coupons valid for.
  • Payment Method: Choose applicable payment methods you want to make coupons valid for
  • Manufacturer: Choose applicable manufacturer you want to make coupons valid for.
  • Shipping Method: Choose applicable Shipping methods you want to make coupons valid for
  • Custom Fields: Choose applicable custom fields you want to make coupons valid for.
  • First order only: If you ticked it, coupons would be valid for customer's first order only.
  • Days of Week: Define the days for those you want to show this method. It would not appear for non selected days.
  • Time Period: Define time period for that you want to show this method. It would not appear for non selected time period.
  • Uses Per Coupon: The maximum number of times the coupon can be used by any customer. Leave blank for unlimited.
  • Uses Per Customer: The maximum number of times the coupon can be used by a single customer. Leave blank for unlimited.

Product Rules

Each product rule has a coupon of modes. Please check this table summary to understand the difference of various mode.

  • Category Rule: Select your appropiate category rule, then choose your categories accordingly.
  • Product Rule: Select your appropiate Rule rule, then choose your Products accordingly.
  • Manufacturer Rule: Select your appropiate manufacturer rule, then choose your manufacturers accordingly.
  • Attribute Rule: Select your appropiate product attribute rule, then choose your attribute accordingly.
  • Product Option Rule: Select your appropiate Option rule, then choose your Options accordingly.
  • Location Rule: Select your appropiate location rule, then choose your product locations accordingly.

Coupon Settings

Coupon By Explanation
Flat Amount To offer a fixed/flat coupon value. Fixed or percentage is available. For example: 25 Or 15% represents 25 percent of the value what you've defined for `Percentage Related To`. By default it is SubTotal.
Range Options. You can define coupon value by the following range option.
SubTotal Define a range of subtotal aka product sub-total and their corresponding coupon value.
SubTotal + Tax of SubTotal Define a range of subtotal+tax aka product total and their corresponding coupon value.
SubTotal - Cost of Discounted Products Define a range of subtotal - any discounted product(e.g. Special price, quantity discount etc.) and their corresponding coupon value
SubTotal + Tax of SubTotal - Cost of Discounted Products Define a range of subtotal + tax - any discounted product(e.g. Special price, quantity discount etc.) and their corresponding coupon value.
Quantity Define a range of cart quantity and their corresponding coupon value
Weight Define a range of cart weight and their corresponding coupon value
Equation Value Define any equation using different placehoolders on the `Final Equation` field and define your coupon value based on the equation value.

Let's look detail at the range fields. Pleaes be noted, the type of value would be determined what's you have defined for the option the `Coupon By`. For example, if the `Coupon By` is Quantity, the value represents quantity.

Start End Coupon Value
Starting Value of the range. It is inclusive value. Ending Value of the range. It is inclusive value Coupon value for this range. Both percentage and fixed are supported e.g. 10% or 10
  • Offer Free Shipping: If you ticked this, It would apply an additional discount equivalent to the shipping cost.
  • Order Total Range:Additional restriction rule if you want to use along with the option `Coupon By`. If you don't need, leave blank
  • Weight Range:Additional restriction rule if you want to use along with the option `Coupon By`. If you don't need, leave blank
  • Quantity Range:Additional restriction rule if you want to use along with the option `Coupon By`. If you don't need, leave blank
  • Percentage Related to: Define how you want to calculate percentage value. For example, If you select this value to `Total`, then 5% represents five percent of cart total. If you ticked `Respect the product rules` checkbox, it would represents total of the applicable products.
  • Maximum Coupon Amount: Limit the maximum amount of the coupon. Leave blank if you don't need
  • Final Equation:

    It has two purposes.
    1. First, if you pick `Coupon By` to `Equation Value`, X-Coupon evaluates its value first, then determine coupon value based on the ranges you have defined above.
    2. Second, You can use it to finalize the coupon value using different condition. You can use any arithmetic equation. For example: {subTotal} *2

    If you provide any equation, the final coupon value will be refined by the result returned by this equation. Even, you can disqualify or make unavailable any coupon from the equation. When X-Coupon finds equation value to -1, the coupon will be unavailable. If the equation returned -1, the coupon would be unavailable.

    Available parameters/placeholders:

    Placeholder Explanation
    {subTotal} Cost of all cart's products
    {subTotalWithTax} Cost of all cart's products including tax
    {weight} Weight of all cart's products
    {quantity} Quantity of all cart's products
    {volume} Volume of all cart's products
    {subTotalAsPerProductRule} Cost of the products those are valid according to the products rule.
    {subTotalWithTaxAsPerProductRule} Cost of the products including tax which are valid according to the products rule
    {weightAsPerProductRule} Weight of the products those are valid according to the products rule.
    {quantityAsPerProductRule} Quantity of the products those are valid according to the products rule.
    {shipping} The shipping cost
    {shippingWithTax} The shipping cost with tax
    {voucher} The voucher amount of the order
    {reward} The applied reward amount
    {special} Total amount of the discounted products
    {xcoupon} Determined Coupon value before the equation. Default initial value 0
    {noOfCategory} Number of different Category
    {noOfLocation} Number of different Product Locations
    {noOfManufacturer} Number of different Product Manufacturers
    {highest} Most expensive product price of the cart
    {lowest} Least expensive product price of the cart
    {lastOrderTotal} Grand Total of customer's last order
    {lastOrderSub} Sub/product Total of customer's last order

Manage Coupons

  • Add Coupon:Add a new coupon manually
  • Generate Coupon: Generate Coupon code automatically.
  • Link Coupons: Link or bring existing coupons under this group.
  • Export Coupons: Export all coupons of this group to CSV.
  • Delete Coupons: It has sub-options e.g. Delete Selected, Unlink Selected and Delete All.

Example

Example 1: Coupons that offers `Free Shipping` for the order over $500

  1. Create a new coupon group and provide a name for it
  2. Now navigate to Price Setting Tab and select `Coupon By` to SubTotal. Then enter Unit Ranges as follows:

    Start End Coupon Value
    500 999999 0

  3. Now tick the checbox 'Offer Free Shipping'
  4. Leave other fields as their default value

Example 2: Coupons that offers 10% discount along with `Free Shipping` for the order over $500

  1. Create a new coupon group and provide a name for it
  2. Now navigate to Price Setting Tab and select `Coupon By` to SubTotal. Then enter Unit Ranges as follows:

    Start End Coupon Value
    500 999999 10%

  3. Now tick the checbox 'Offer Free Shipping'
  4. Leave other fields as their default value

Example 3: Coupons that offers 10% discount when order is less than $500 and 20% when order over $500

  1. Create a new coupon group and provide a name for it
  2. Now navigate to Price Setting Tab and select `Coupon By` to SubTotal. Then enter Unit Ranges as follows:

    Start End Coupon Value
    0 500 10%
    500.1 99999999 20%

  3. Leave other fields as their default value

Example 4: Coupons that offers 10% discount on category X,Y only.

  1. Create a new coupon group and provide a name for it
  2. Under `Product-Rule` tab, Select `Category rule` to `Any of the selected ones along with other`
  3. Now Select the category X and Y
  4. Now navigate to Price Setting Tab and select `Coupon By` to Flat Amount.
  5. Enter the coupon value to 10%
  6. Leave other fields as their default value

Example 5: Coupons that offers 10% discount on non-discounted products only.

  1. Create a new coupon group and provide a name for it
  2. Now navigate to Price Setting Tab and select `Coupon By` to Flat Amount.
  3. Enter the coupon value to 10%
  4. Select the `Percentage Related to` to `SubTotal - Cost of Discounted Products`
  5. Leave other fields as their default value

Live Debugging

Live debug option is available in Global Setting -> Help -> Live Debug.
Debugging can help you to find out why a particular coupon method did not show up in the site. First enable debug mode in xcoupon global setting.

Once debug mode is ON, click the Live Debug button in Global Setting -> Help -> Live Debug and keep the debug window open. Now try applying a coupon on the site. Look get your eyes back at the debug window, it would print rules names that have restricted the coupon.

FAQ

Q. I am not getting X-Coupon under admin -> Extensions -> Modules.

A. Usually happens in OC 2.x. It simply means that your X-Coupon installation was not done correctly. Most probably your ftp root is incorrect under store setting. Please recheck ftp root under store setting and re-install xcoupon again.

Q. I am not able to install xcoupon through Opencart Installer.

A. If your OC version is v3.x, make sure you are installing the correct file for your OC version. The file name is xcoupon.ocmod.zip NOT xcoupon.zip

If your OC version is 2.x, most probably your ftp information is wrong under store setting. Please recheck ftp root under store setting and re-install xcoupon again. If problem persist, it could be opencart core issue. In that case you can install manually, check this youtube video.