Jump to content

Rounding error of product attributes


Recommended Posts

Hi, I'm using PS 1.6.1.5 with the default template.

I have problems on products sheet because in some cases PS 0.01 Eur are added to the selling price due to rounding. For example: the price VAT incl. should be Eur 62,90 but 62,91 Eur screen is displayed.

I think the problem occurs in the updatePrice () function found in theme-> JS-> product.js because the value of the variable $ combination.price is rounded to 2 decimals when its value in the database has 6 decimals.

For example: the value of $ combination.price in the database is 17.355371 but its value in updatePrice () function is 17.36 and this causes the value of the product is increased by 0.01 Eur.

I need help to make the rounding of the variable $ combination.price to 6 decimals or to have the same value of the database.

Thanks for your help

Link to comment
Share on other sites

  • 1 year 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...