Better Coupon

Overview

Let’s picture this scenario: Store owners desire to generate a one-time use coupon for a customer, but it takes at least 5 minutes to make it manually? Or take another look at this case: the coupon codes generated in Magento 2 do not with the current discount program, either they can’t import their pre-made coupon codes into Magento 2 system. Time-consuming tasks are coming up more, you have no idea how to give the applied coupon checkout link to customers so that they don’t need to ask and enter the coupon every time they come to your store?

All disturbing issues now can be remedied by only one proficient plugin. Magento 2 Better Coupon extension, supplied by Mageplaza, is designed to craft many coupons and send them over customers via emails just by one click. And the configurations cannot be easier if you can follow this documentation carefully.

How to download and install

How to configure

From the Admin Panel, go to Store > Settings > Configuration > Mageplaza Extensions: Better Coupon

https://i.imgur.com/k6iqSnV.png

I. Configuration

1.1. General configuration

After entering the module’s configuration, you will find the General configuration to turn the module on/off generally.

https://i.imgur.com/9OHyYIS.png

  • Choose “Yes” to enable the Better Coupon extension.
  • If you choose “No”, you will be able to generate and send coupon(s) by Generator.

1.2. Generate Coupon

1.2.1. Generator

https://i.imgur.com/XXGzxII.png

  • In the Rule field:
    • Choose the rule you want to apply for the coupon generator (Rule can be created from Marketing > Promotions > Cart Price Rules)
    • All generated coupons by this module will follow this choosen rule.
  • In the Qty field:
    • Enter the quantity of coupon code you want to generate.
    • If you leave it blank or enter 0, the default quantity will be 1.
  • In the Coupon Code Pattern field: Enter your favorable pattern for coupon code(s).
  • In the Send Email field: Select “Yes” to activate sending coupon(s) via email.
  • In the Send Email From field:
    • Choose the store you want to send coupon code(s) from.
    • Store’s name will be displayed in the email sending to the customer.
  • In the Email Address field:
    • Enter email(s) you want to send coupon code(s).
    • You can enter multiple emails seperated with a commas ,
    • All generated coupons by this module will be sent to entered email(s), so remember to change them every time you generate a new series of coupon codes for different customers.
  • In the Email Template field:
    • Choose the template for the sending email.
    • You can edit/customize the email content at Marketing > Email Template.
  • The Generate button:
    • Clicking on this button to generate and send configured coupon code(s).
    • The number of success generated coupon code(s) will be informed after clicking.

This is an example of the email for informing generated coupon code(s).

https://i.imgur.com/fWCXgTM.png

II. Import Coupon Code

From the Admin Panel, go to Marketing > Promotions > Cart Price Rules > Add New Rule

2.1. Import by CSV file

https://i.imgur.com/HtcOttF.png

You can import a CSV file type which contains coupon code in this section. After selecting and importing the file, coupon code will be added in Manage Coupon Code.

2.2. Import by Text Area

https://i.imgur.com/nr24t8s.png

Similar to Importing by CSV file, coupon codes after being imported can be used normally in Manage Coupon Code as well.

  • If you do not know how to create a coupon code list in a CSV file, you can click on the Download Sample File link to download the sample file.
  • Coupons that are entered in the Coupons field or available coupons in the CSV file must be separated by a break line or a commas.
  • Whereas the current imported coupon list contains some coupon codes identical to the coupon previously created, duplicated codes will not be added anymore and there will be a message telling the store owner how many coupon codes have been coincident.

III. API Integration

Better Coupon extention supports API Integration which means store owners can generate coupon code(s) via Magento 2’s API by following this syntax domain.com/rest/V1/bettercoupon/rule/id. For example:

domain.com/rest/V1/mpcoupon/generate/{key}

For example:

http://mageplaza.com/rest/V1/mpcoupon/generate/ixolofk9q8f4slxggq.

The created coupon link is similar to The quick coupon link, every time the page is refreshed, a new coupon following the [12AN] pattern will be generated. Enter the rule ID to decide which rule that coupon code is based on. You can choose key from Access Key to decide its rule and pattern.

You can learn how to create an API and token-based authentication here.

https://i.imgur.com/kzWLXRG.png