Jump to content
kongkiat

How to disable decimal number Prestashop 1.7.0.2?

Recommended Posts

I can not disable decimal number on prestashop 1.7.0.2. 

Please advice me.

 

Thank you.

Share this post


Link to post
Share on other sites

so now decimals are just a global option?  I can't support multiple currencies on the same store, some with decimals and some without?  way to go Prestashop!

  • Like 1

Share this post


Link to post
Share on other sites

Hello guys, 

any solution for the decimal issue?

 

i've been testing 1.7 and is the only thing that don't work

Share this post


Link to post
Share on other sites
Removing decimals:

in this file web/translations/cldr/main--xx-XX--numbers , change "standard":"#,##0.00\u00a0\u00a4" to "standard":"#,##0\u00a0\u00a4"

 

xx-XX is language/translation which you use

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you very much, mysho. That did the trick for cart and catalogue but not for front page. The latter still shows decimals.

Its' 1.7.1.1 already, but still no official fix...

 

 

Off topic:

The more I see such flaws in the code (dozens of ways to save different data that lead to errors and bugs eventually) the more I understand that Open Source is a great way to create apps, but when it comes to support, they try to fix things, but nobody cares about integrity. Instead of polishing half-working 1.6 they switched to Symphony (which is not bad by itself) and called it 1.7. Still half-working. Check the amount of unresolved or closed unsolved tickets on Forge...

Edited by Serge Goujon (see edit history)

Share this post


Link to post
Share on other sites

 

Removing decimals:
in this file web/translations/cldr/main--xx-XX--numbers , change "standard":"#,##0.00\u00a0\u00a4" to "standard":"#,##0\u00a0\u00a4"
 
xx-XX is language/translation which you use

 

Excelent! Thanks You!

Share this post


Link to post
Share on other sites

This solution is half working actually. If you remove .00 but your items has prices with decimals then final price will be incorrectly calculated in the basket.

As for an examle: you have product#1 with price "10.55", if you remove .00 at standard section of the file then its price will be shown at frontend as "10" but if you add 2 pcs of product#1 to the basket final price will be "21" but not "20". Additional removal of .00 at accounting section of the file does nothing.

Any ideas?

Share this post


Link to post
Share on other sites

@884483048 Sir, you cannot have both. Either you can remove the decimals or you can have the exact price. If you want the exact price then don't remove the decimals.

Thanks

Share this post


Link to post
Share on other sites
Posted (edited)
17 minutes ago, Himanshubishtt said:

@884483048 Sir, you cannot have both. Either you can remove the decimals or you can have the exact price. If you want the exact price then don't remove the decimals.

Thanks

You don't understand - removing decimals in translation file "standard section" cause only visual effect. If goods prices in sql base were filled with decimals basket calculations will be incorrect. I tested what I am saying on Presta 1.7.3.2

Edited by 884483048 (see edit history)

Share this post


Link to post
Share on other sites
Posted (edited)

Update: this solution seems working correctly with prices (unsure about discounts etc) but only if "number of decimals" is set to 0 at shop parameters and corresponding rounding is enabled.

Edited by 884483048 (see edit history)

Share this post


Link to post
Share on other sites
On 5/18/2019 at 6:01 PM, KILIYATSIA said:

Back Office > Configure > Shop Parameters > field option "Number of decimals"
 

This doesn't modify the number of decimals displayed, this is only for precision.

Share this post


Link to post
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

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More