discount code doesn't work properly .

WordPress Event Management, Calendars & Registration Forums Report A Bug discount code doesn't work properly .

This topic contains 8 replies, has 2 voices, and was last updated by  Stephen Harris 6 years, 12 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #29081

    I use discount code adon for JPY.

    Unfortunately discount amount was one-thousandth of the actual discount amount ,when I use offline payment.

    When I try to pay with PayPal, it will not be discounted at all.

    Please advise?

    IITOMI AKITSUGU
    #29085

    What were the settings used for the discount code? Was it a flat amount or a percentage? And what was the value?

    Stephen Harris
    #29094

    Both flat amount and percentage.
    I set flat amount value 3000 JPY otherwise discount amount is 3 JPY.
    In the case of percentage set 10% (Product is 40000JPY discount amount 4000 JPY) otherwise discount amount is 4 JPY.

    IITOMI AKITSUGU
    #29101

    Thanks for reporting this bug. The bug is with the discount codes plugin, and it effects discount amounts with a value over 1000. The value of the discount is being saved to the database with a semicolon, when it’s retrieved the semicolon is treated as a decimal point.

    A quick fix is to replaces line 668 and 669 of event-organiser-discount-codes.php:

        if( $discount_amount && floatval( $discount_amount ) > 0 ){
            $amount = max( 0, $amount - floatval( $discount_amount ) );
    

    with

        if( $discount_amount && floatval( str_replace( ',', '', $discount_amount ) ) > 0 ){
            $amount = max( 0, $amount - floatval( str_replace( ',', '', $discount_amount ) )  );
    

    An update will be released this week to address this issue.

    Stephen Harris
    #29103

    Thank you for your prompt reply.
    And Thank you fix code.
    I’m looking forward to updating plugin.

    IITOMI AKITSUGU
    #29104

    Sorry to keep bothering you.

    Discount does not work when use paypal.
    Offline payment and stripe payment are noproblem.

    I would be grateful if you could confirm.

    • This reply was modified 7 years ago by  IITOMI AKITSUGU.
    IITOMI AKITSUGU
    #29126

    Yes, I can confirm the above fix doesn’t fix the PayPal gateway which requires a separate fix.

    The update that’ll be released later today will address the root problem and will fix it for all gateways.

    Stephen Harris
    #29128

    I appreciate how swiftly and expertly you dealt with that matter. Thank you.

    IITOMI AKITSUGU
    #29157

    Just in case you missed it, there’s an update that’s been released for the discount codes extension. It should fix the issues raised here. Please let me know if you have any further issues.

    Stephen Harris
Viewing 9 posts - 1 through 9 (of 9 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.