Jump to content

3 decimals on Front, 2 decimals on Back


VeraOne

Recommended Posts

Hi devs!

I'm trying to solve a problem with my website, without much success. Some prices of some products are 0.004€ for example. Or the unit price is 0.30€.

What happens is that having prestashop configured with 2 decimals, it does not show the prices of products with 3 decimals. I also think that as it can't show the retail price properly, it doesn't show the unit price properly either.

 

Options I have tried:

  •     I have tried changing the currency precision both in prestashop and directly in the database (ps_currency).
  •     Go to the CLDR folder and in main--xx-XX--numbers change the precision values of "accounting" and "standard" to show 3 decimal places, without success.
  •     Tweak the Formatter.php file as indicated at the end of this thread -> PS Forum
  •     Change the currency precision, with success as the price is displayed but with errors when processing the payment.
  •     I also changed the currency precision and then checked the Paypal module files, specifically paypal.php looking for "ps_round". But I didn't get anything either.

 

The intention of this change is to show the price correctly (3 decimals) although internally it works with 2 decimals so that modules like Paypal do not give errors.

Thank you very much in advance!

 

Capture.PNG

Retail Price.PNG

2 Decimals - PS 1.7.PNG

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

  • 3 months later...

Hello, i was having a similar problem and tryied similar aproach to get a solution. Finally the solution was delete the currency with the problem (I have multiple currencies,  dollar its not the default in my shop )  from the BO and then create a new one.
I hope this help anyone.

Greetings.

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