Title: Discount codes warning
Last modified: July 25, 2019

---

# Discount codes warning

 *  Resolved [timb111](https://wordpress.org/support/users/timb111/)
 * (@timb111)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/discount-codes-warning/)
 * I’ve received a screenshot from someone trying to use a discount code on my EME
   event page. It shows an orange warning box above the booking form that says “
   You did not enter a valid discount code”.
 * The screenshot is from a mobile phone and as the booking table is quite narrow
   I can only see part of the discount code, so I can’t see if they’ve entered the
   code fully or correctly.
 * When I try to recreate the error, I can’t. If I enter an incorrect discount code
   then the only thing that happens is that the discount is not applied to the total
   amount due.
 * If I try to submit the booking form using an incorrect discount code then it 
   doesn’t give me any warning, and it just processes the booking with the full 
   event price. I’ve tried on my PC and mobile but don’t receive any warning on 
   either. Do you have any idea why my customer received the invalid discount code
   warning but I don’t?
 * Also I’d like to display the Coupon Code of the discount accepted (but not the
   discount name and not the discount group name), so that the customer can see 
   that they’ve correctly entered the code and received the discount. Is there a
   way to do this?
 * I tried adding adding #_APPLIEDDISCOUNTNAMES in EME>>Settings>>RSVP>>Booking 
   form format, so people can clearly see if their discount code has been accepted,
   but this only shows the text “#_APPLIEDDISCOUNTNAMES”, but not the actual discount
   Coupon Code accepted. This is the code I used:
    `<tr><th scope='row'>Applied 
   discounts:</th><td>#_APPLIEDDISCOUNTNAMES</td></tr>`
 * And one last question.. I think it would be better if the user is forced to correct
   or remove a discount code before proceeding with payment. Is it possible to prevent
   the booking if a customer enters an invalid discount code?
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/discount-codes-warning/#post-11766742)
 * #_DISCOUNTCODES_ENTERED is what you’re looking for to display the discount codes
   entered. But #_DISCOUNTCODES_ENTERED (and also #_APPLIEDDISCOUNTNAMES) are RSVP
   placeholders, so you can show them in the mail or the thank-you message or so(
   but obviously not in the form itself).
    In the form itself you can use #_DYNAMICPRICE,
   which is an indicator for applied discounts (it dynamically updates the price
   to pay). Normally, when using a non-empty incorrect discount code you should 
   get a warning and it should block the process. I’ll test that here to be sure.
   Edit: test done and the warning appears just fine if an incorrect discount code
   is used.
 *  Thread Starter [timb111](https://wordpress.org/support/users/timb111/)
 * (@timb111)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/discount-codes-warning/#post-11767533)
 * Ok, I’ve tested it on 2 websites and get differing results.
 * On the first site, it definitely doesn’t give a warning when using an incorrect
   discount code, and does allows me to continue to pay with an incorrect code.
 * I’ve just set up a second website with EME and set up one event and 2 discounts(
   one is an early bird with no coupon code or expiration date), and both of these
   discounts are in a discount group. This site does show a warning of an incorrect
   code after clicking the “Send your booking” button. But this site has a different
   discount issue. EME applies an early bird discount by default but removes it 
   as soon as any coupon code is entered. So if an invalid code is entered then 
   it charges full price, and if a valid code is entered then it only gives the 
   valid code discount and not the early bird discount as well. I checked the discount
   group and the “Max amount of discounts applied” is set to zero so there should
   be no limit. I’ve had a look through the settings but can’t see where else it
   could be limiting the number of discounts used to just 1.
 * In the EME>>Settings>>RSVP>>Booking form format, here’s the code I’m using for
   both websites. I’m just using one #_DISCOUNT placeholder. And on the first website
   that seems to work just fine, to give an early bird discount and also allow the
   use of a coupon code as well.
 *     ```
       <table class='eme-rsvp-form'>
           <tr><th scope='row'>First Name*:</th><td>#REQ_FIRSTNAME</td></tr>
           <tr><th scope='row'>Last Name*:</th><td>#REQ_LASTNAME</td></tr>
           <tr><th scope='row'>E-Mail*:</th><td>#REQ_EMAIL</td></tr>
           <tr><th scope='row'>Phone number:</th><td>#_PHONE</td></tr>
           <tr><th scope='row'>Seats*:</th><td>#_SEATS</td></tr>
           <tr><th scope='row'>Discount code:</th><td>#_DISCOUNT</td></tr>
           <tr><th scope='row'>Total:</th><td>#_DYNAMICPRICE</td></tr>
           <tr><th scope='row'>Subscribe to our email newsletter:</th><td>#_OPT_IN</td></tr>
           <tr><th scope='row'>Comment:</th><td>#_COMMENT</td></tr>
       </table>
       #_SUBMIT
       ```
   
 * I’ve emailed you the website links so you can see. Can you please let me know
   if I’m missing something obvious?
 * Thanks
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/discount-codes-warning/#post-11768649)
 * Ok, the combo of early bird and regular discounts indeed led to the fact that
   the regular discount code was not reported as “wrong” when a wrong code was entered.
   This has been fixed here:
    [https://plugins.trac.wordpress.org/changeset/2128740/](https://plugins.trac.wordpress.org/changeset/2128740/)
 *  Thread Starter [timb111](https://wordpress.org/support/users/timb111/)
 * (@timb111)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/discount-codes-warning/#post-11768871)
 * That’s great Franky, thank you for fixing that.
 * Should I wait for the next version of EME to be released, or should I download
   the zip archive on that changeset page and overwrite the current files?
 * Thanks
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/discount-codes-warning/#post-11769479)
 * Either apply the changeset manually, download the development version or wait
   for the next release 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Discount codes warning’ is closed to new replies.

 * ![](https://ps.w.org/events-made-easy/assets/icon-256x256.png?rev=1856035)
 * [Events Made Easy](https://wordpress.org/plugins/events-made-easy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-made-easy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-made-easy/)
 * [Active Topics](https://wordpress.org/support/plugin/events-made-easy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-made-easy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-made-easy/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Franky](https://wordpress.org/support/users/liedekef/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/discount-codes-warning/#post-11769479)
 * Status: resolved