macchi
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Bulk Discount] remove Decimal in cartDear Wasantec,
Sorry I don’t understand what you mean.
But perhaps I have a solution for you, please read below.
Kind regards,
/Macchi***********
Disclaimer: This is only a humble suggestion since I am not a developer of this plugin. Make a backup of everything before any changes and be very careful with the code. Otherwise your site and shop may crash completely.
***********This plugging has numerical errors on rounding, thus I had I had to edit the code to make the following corrections on the woo commerce-bulk-discount.php:
1) Minimize numeric errors:
Change all (four) usages of the function “round(__something__,2)” in the code to “round(__something__,10). This reduced rounding errors.2) Adjust number os decimals for discount in the cart:
At the function “filter_subtotal_price()”, near the line number 232 you may change the usages of the function “round(__something__,2)” in the code to “round(__something__,0). Then the discount will be shown without decimals rounded to the nearest integer.As I mentioned I am not a developer of this plugin, but hope this helps. Please double check your code and calculation results before releasing changes into your production environment.
Any updates on this?
It is important for us to show the actual discounted prices when the quantity changes.
Both in the product page and in the cart. Otherwise volume discounts will not be so visible to customers.Thanks in advance for answers and suggestions!