Okay
  Public Ticket #3074486
Bug Discount
Closed

Comments

  •  2
    paola started the conversation

    Hi I’ve a big problem with price discount.

    Your plugin truncate decimal price with 2 decimals and the total cart results wrong 

    For example:
    My product costs € 5,07 and I’ve 25% discount. The discounted price could be € 3,8025 and if I buy 500 pieces the total could be € 1901,25.

    Your plugin make 25% discount with 2 decimals, so my product costs € 3,80.
    3,80 * 500pieces = 1900.

    How can I solve this bug?

    I've tried to use a woocommerce coupon and it works correctly.

    Thank you

    Attached files:  schermataBug.jpg

  •  1,906
    WebWizards replied

    Hi Paola,

    Which version of the plugin do you have active


    Please make sure that you are using B2BKing's latest plugin version, currently 4.1.97 on CodeCanyon. 

    It may also help to add the following PHP code snippet to your site:

    add_filter('b2bking_rounding_precision', function($val){
        return 4;
    }, 10, 1);
    

    Please check the above and let us know,


    Kind regards,

    Stefan

  •  2
    paola replied

    Hi thank you for your answer but it doesn't work :-(

    Attached files:  sche.jpg

  •  1,906
    WebWizards replied

    Hi Paola,

    If you can share a backend login to your site or a staging site, we can look into this directly for you,

  •   paola replied privately
  •  1,906
    WebWizards replied

    Thank you,

    I've now applied a plugin update to your site and I believe this will work as desired now.

    For example a test with showing 4 decimals:

    1460072372.png


    With 2 decimals:

    7229590279.png


    Kind regards,

    Stefan

  •  2
    paola replied

    Thank youuuu soooo much. Great work ;-)