Prestashop Tutorial – How to change the number of decimal points in product price

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

round-up-decimal-hiddentechies

If we set ‘0’ in “Number of decimals” field, it still shows decimal with round up.

remove_decimal_prestashop 1.7_hiddentechies

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.

remove-decimal-value-hiddentechies

If you still have any doubts, feel free to ask in comments and we’ll reply as soon as possible.

1 Comment

  1. What to do when you have multiple currencies – i.e Euro (2 decimals) Ruble (no decimals)?

Leave a Reply

Your email address will not be published. Required fields are marked *