Discount Codes Add-On

This topic contains 2 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12118

    Hi Stephen,

    Is there a placeholder code I can use in the booking/confirmation email template that flags up that a discount code has been used and/or calculates the amount of discount given?

    Also, the codes themselves appear to be case sensitive. Is there a way of making them not case sensitive (ie without creating additional codes in a different case)?

    Paul Oaten
    #12119

    Also, would be nice if the fact that a discount code was used was flagged in the Booking Details page under the Events menu

    Paul Oaten
    #12131

    There’s no e-mail placeholder for discount codes as of yet, and it sounds like you might require conditional logic. Probably the best way of doing this would be to use the [code on this thread] to add your own place-holder, or perhaps dynamically alter the message if a discount code has been used.

    You can get the discount details (array) and discount amount with the following:

    $discount = eo_get_booking_meta( $booking_id, 'discount', true );
    /* Retruns array indexed by
     *  - id - ID of the discount code
     *  - code The actual discount code
     *  - discount - percentage/flat amount discount (i.e. 50 is either 50% or 50 currency units discount)
     *  - discount_type either 'percentage' or 'flat-amount'.
     *  - min_requirement  - minimum checkout value or ticket quantity
     *  - min_requirement_type - 'tickets' or 'amount'
    */
    
    $discount_amount = eo_get_booking_meta( $booking_id, 'discount_amount', true ); 
    //returns float (positive), the amount of money discounted from the total price

    Is there a way of making them not case sensitive…

    Not yet, but I think they probably should be. I’ll fix this in the next update.

    Also, would be nice if the fact that a discount code was used was flagged in the Booking Details page under the Events menu

    Agreed, will add this in an update to Pro.

    Stephen Harris
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.