• Resolved thom78

    (@thomaspix78)


    Hello,

    I contact you because I have a rounding problem when applying a percentage discount on products. For example, for a product displayed at € 6.32 in my catalog, with a discount of 5% it gives a product at € 6. If I add 4 of these products to cart, it gives me a total of 24.02 € instead of 24 €.

    I think this is due to a rounding problem when the percentage is applied. How can I solve this problem?

    Regards,

    Thomas

    • This topic was modified 6 years ago by thom78.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hello,
    edit this file plugins\yith-woocommerce-dynamic-pricing-and-discounts\includes\class-yith-wc-dynamic-pricing.php

    add this code

    $price = (apply_filters(‘yith_ywdpd_round_discount_price’, false)) ? round($price) : $price;

    on line 219

    then add this code to your theme functions.php

    add_filter(‘yith_ywdpd_round_discount_price’,’__return_true’);

    The above filter will be added in next plugin update too

    Best Regards

    Thread Starter thom78

    (@thomaspix78)

    Hello,

    Thank you for your reply.

    I inserted this snippet and it works in my minicart, but not in my cart where the problem remains the same.

    Looking forward to a solution to this problem,

    Regards,

    Thomas

    Plugin Author YITHEMES

    (@yithemes)

    Hi,
    We are working to fix this issue.
    As soon as possible we will release a new update to fix the problem

    Hi

    I just noticed your plugin has a conflict with this plugin – https://woocommerce.com/products/dynamic-pricing/

    The dynamic pricing plugin allows for quantity discounts. I have quantity discounts set to provide a 10% discount. When your plugin is enabled the discount is not being applied correctly. It’s applying the discount twice.

    Plugin Author YITHEMES

    (@yithemes)

    Hello, this is off-topic. For the next time, you should create a new thread for it.
    Our YITH WooCommerce Dynamic Pricing and Discounts is not compatible with that plugin, I’m sorry.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Rounding problem when applying a percentage discount’ is closed to new replies.