Jump to content

Round up + Discount 50% problem


Recommended Posts

Hello to all,


i'm stuck with this situation:

  1. Product price: 114,99
  2. Discount reduction: 50%
  3. Currency precision: 2
  4. Total amount: 57.49
  5. Prestashop Version: 1.7.8


Now everything is "right", but we have an erp that fetch prestashop orders to create&manage our needs.

Where is the problem?

The problem is related to the method of round because that's our situation on erp:

  1. Product price: 114,99
  2. Discount reduction: 50%
  3. Total amount: 114,99 / 2 = 57.495 --> rounded up to 57.5


How we can work on Prestashop to allow a situation like the erp one?

I have tried with round configuration but nothing happens cause for sure the precision is the key, but i don't know how to touch it.


2° try

Try to figured out with override on variable $precision in Classes/Tools.php to work with 3 decimals but nothing happens.


Many thanks,


Edited by Matteo (see edit history)
Link to comment
Share on other sites

  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...