Jump to content

Round Function


Recommended Posts

Hello
I am creating my online store in prestashop 1.7.3.3 and I came across some errors in the rounding of values.
When I write a function in php like this:
{Tools :: displayPrice (round (($ product.price) /1.23), 2)}
If for example the product.price is 35 €, it shows the result of 28.00. But the correct value is 26.02.

What function can I use for this not to happen?

Link to comment
Share on other sites

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...