Coupon Error Message Extension for Magento 2

The Coupon Error Message Extension for Magento 2 enhances the user experience by allowing store owners to create customised error messages for coupon code failures based on specific rule conditions. Instead of displaying a generic “Coupon code is not valid” message, customers receive clear guidance tailored to their situation, such as “Total amount should be $110 or more” when they don’t meet the minimum order requirement. This extension can be used during any promotional campaign, improving customer understanding and satisfaction. By providing detailed feedback, it helps reduce frustration and enhances the likelihood of completing a purchase.

Features

  • Custom Error Messages: Display simple or detailed messages tailored to specific coupon rule failures.
  • Customer Guidance: Clearly inform customers about reasons for coupon code rejections.
  • Easy Management: Simplify the management of coupon rules and associated messages.
  • Unique Messages: Create specific error messages for each coupon requirement.
  • Sales Boost: Enhance the shopping experience, contributing to increased sales.

Steps:

  1. Extension Installation Guide
  2. Configuration
  • Extension Installation
    • Download the zip file
    • Extract and put it into /app/code/
    • Open Cli in the Magento directory and follow the below commands:
      • php bin/magento setup:upgrade
      • php bin/magento setup:di:compile
      • php bin/magento setup:static-content:deploy
      • php bin/magento cache:clean
      • php bin/magento cache:flush
  • Configuration:

STEP 1

  • Go to Admin > Stores > VDC STORE >
  • Module: Select ‘Enable’ the module.
  • Customer Doesn’t Belong to Assigned Customer Group: Enter your customized message to show a Coupon Error Message to those not added to your customer group.
  • Coupon is Not Available on Website: You can enter your customized error message if you have multiple websites and your coupon does not apply to all.
  • Coupon Exist But Shopping Carts Do Not Apply to the Rule Condition: Admin can set a rule condition which needs to be accepted by the coupon needs, if it doesn’t then you can show a customized error message for your customer.
  • Coupon Doesn’t Exist: When a customer enters a wrong coupon code then set a customized message to show them an error.
  • Coupon Exist But Expired: You can set the expiry of your coupon code, after its expiry if a customer tries to put a customized message to show them an error.

NOTE: The Coupon exists but has expired condition only applies to the community not to enterprises because the date picker is not accessible on the enterprise.

STEP 2

  • Go to Marketing > Cart Price Rules

STEP 3

  • Here you can add a new rule for a coupon code by clicking on ‘Add New Rule’.

STEP 4

  • Customer Doesn’t Belong to Assigned Customer Group: Enter your customized message to show a Coupon Error Message to those who aren’t added to your customer group, if you don’t write a message over here then by default it will take your message which you mentioned earlier at the time of Coupon Error.
  • Coupon is Not Applicable on Website: Here you can enter your customized error message if you have multiple websites and your coupon does not apply to all, if you don’t write a message over here then by default it will take your message that you mentioned earlier at thetime of Coupon Error.
  • Coupons Exist But Shopping Cart Do Not Apply to the Rule Condition: Admin can set a rule condition which needs to be accepted by the coupon needs, if it doesn’t then you can show a customized error message for your customer, if you don’t write a message over herethen by default it will take your message which you mentioned earlier at the time of CouponError.
  • Coupon Exists But is Expired: You can set the expiry of your coupon code, after its expiry if a customer tries to put a customized message to show them an error, if you don’t write a message over here then by default it will take your message which you mentioned earlier at the time of Coupon Error.
  • After writing your customized error message click on ‘Save’ and proceed further.

STEP 5

  • When you are adding a product to your cart, you can check your Coupon Code and then proceed with the checkout. For example, when you are adding a backpack to your cart, check Coupon code ‘ENJOY10 and proceed with the checkout process.

STEP 6

  • This error will showcase when the admin has put such conditions like a customer retailer or wholesaler should be logged in to the website to grab the coupon successfully. If they’re not logged in then the coupon will be invalid.
  • You can also set customized ‘Default Welcome Message, Sign in, or Create An Account’ at the top of the page.

STEP 7

  • The error message will be showcased when the Coupon Code is not available on thewebsite.

STEP 8

  • You can set your rule conditions on Actions, Labels, and Manage Coupon Code. Admin can also set Coupon Qty for your coupons. After adding all the conditions click on ‘Save’ and proceed.

STEP 9

  • When you set your rule condition and it does not match on the product page then it will show your customer a pop-up error message.

STEP 10

  • When a customer applies a coupon and it will be successfully added then the customer can see a pop-up on the top. For example, When you are adding a backpack to your cart, check Coupon code ‘ENJOY10 and proceed with the checkout process if that coupon was added successfully.