In Prestashop 1.7, the decimals feature does not work anymore even if we change number of decimal on the Back Office because we mostly round up the price (it should be 0 instead of 0.00).
Basically there is option to set it on BO:
Back Office > Configure > Shop Parameters > field option “Number of decimals“
If we set ‘0’ in “Number of decimals” field, it still shows decimal with round up.
That’s why today, I’m going to explain about how to change Number of decimals in prestashop 1.7.
To remove decimals in Prestashop 1.7,
Step: 1
Open :
/translations/cldr/main–en-US–numbers
Where,
- en: language which you use
- US: country which you use
Step: 2
Search for this string “standard”:”\u00a4#,##0.00″ using your text editor.
Here is the code we see in the file: “\u00a4#,##0.00”
Where,
- \u00a4 : mean the currency
- 0.00: mean type 0 is integer
Step: 3
To remove decimals just edit this code.
“\u00a4#,##0”
For example,
To change the format to 1 decimals: “standard”:”\u00a4#,##0.0″
To change the format to 3 decimals: “standard”:”\u00a4#,##0.000″
If you don’t want to see decimals on your shop, just delete “.00” and save the file, and that’s all. Make sure to clear cache also.
If you still have any doubts, feel free to ask in comments and we’ll reply as soon as possible.
February 2, 2019 at 4:17 am
What to do when you have multiple currencies – i.e Euro (2 decimals) Ruble (no decimals)?
April 30, 2020 at 4:29 pm
Useful information thanks for your post.
May 7, 2020 at 12:52 pm
Nice Post!
August 15, 2020 at 11:54 am
Hi! In my folder “public_html/translations/cldr”, I only have one file “.htaaccess”
September 25, 2020 at 3:50 pm
I have the same problem … any idea or solution?