Magento Extension Coupon Management

You can integrate with Bronto’s separate Coupon Manager app, where you can create, manage and distribute unique coupon codes via email or SMS for high-impact promotional campaigns.

About this task

Coupon codes can be applied to a customer’s shopping session with one of two methods. There is a controller that listens to the store front route /apply/coupon/. You can pass the coupon code in the designated Coupon Code Query Parameter, and a redirect URL. For example: the URL http://bronto-magento-test-001.bitnamiapp.com:80/magento/index.php/apply/coupon/?coupon=ABC123&redirect_path=%2Fcheckout%2Fcart will apply coupon ABC123 to the customer’s shopping session, and redirect them to http://bronto-magento-test-001.bitnamiapp.com:80/magento/index.php/checkout/cart/.

The second method applies a coupon code by using an observer with Use Event Observer that will scan any store front URL for the Coupon Code Query Parameter. This method is optional, as it can be disabled. If the module is disabled, the controller will still perform redirects, but it will no longer apply coupons.

Procedure

  1. Copy the coupon manager account id from the Coupon Manager App
    coupon manager account
    1. In Bronto, click the gear icon in the Coupon Manager App.
    2. In the pop-up, select the Redemption JavaScript Snippet.
    3. In the pop-up, select the Coupon ID and copy it to the clipboard.
  2. Add the coupon manager account id to the extension
    coupon manager settings
    1. In Magento, go to System > Configuration.
    2. In the left menu, scroll until you see Bronto and click Coupon Manager.
    3. Paste the script into the Coupon Manager Account ID text area.
    4. Click Save Config.
  3. Configure auto-apply coupons using the following information:
    Field Name Description Example
    Use Event Observer The `Use Event Observer` switch will scan all front end URLs for the parameters in question instead of use a specific controller URL. N/A
    Coupon Query Parameter The `Coupon Code Query Parameter` allows you to define the query parameter representing the coupon code to apply to the customer shopping session. N/A
    Invalid Coupon Query Parameter The `Invalid Coupon Query Parameter` allows you to define the query parameter representing the error code for an invalid message to display to the customer. N/A
    Success Message The `Success Message` allows you to define the message to be displayed to the customer if the coupon code was successfully applied. Coupon {code} was successfully applied to your shopping session.
    Invalid Message The `Invalid Message` allows you to define the message to be displayed to the customer if the coupon code invalid or if some other error occurred. The Coupon {code} is invalid.
    Depleted Message The `Depleted Message` allows you to define the message to be displayed to the customer if the coupon code is depleted. The Coupon {code} has been depleted.
    Expired Message The `Expired Message` allows you to define the message to be displayed to the customer if the coupon code is expired. The Coupon {code} has expired.
    Conflict Message The `Conflict Message` allows you to define the message to be displayed to the customer if the coupon code is going to replace the coupon code already applied on their cart. Your shopping session already has coupon {oldCode} applied. {link} to apply {newCode} instead.
    Link Text The `Link Content` allows you to define the contents of the force application link used in the `Conflict Message`. Click Here
  4. To test:
    1. Create an order in Magento using a Coupon Manager coupon.

      Assuming you have already imported coupons into Bronto from Magento, create an order in Magento using a Coupon Manager coupon.

    2. Verify the coupon was redeems in the Coupon Manager App.