wahmkow Posted November 23, 2019 Share Posted November 23, 2019 Hi everyone! I would like to limit the number of decimal places to only 2 for the unit price on the product page. Currently there are 6 decimal places shown. Since only the price-ratio is stored in the database, the numbers resulting for the unit price look e.g. like 5.500002 - which does not make a lot of sense to me. In the code I found that the priceFormater is used on the unit_price (class ProductLazyArray line 669 call of function format). However I suspect that the unit_price has the currency symbol already appended. This makes it a string and the priceFormatter does not do anything with it anymore. Are the 6 decimal places intended or is this a bug? Using PS 1.7.6.1 Thanks for any suggestions! Jörg Link to comment Share on other sites More sharing options...
PCQUATRO Posted November 23, 2019 Share Posted November 23, 2019 5 hours ago, wahmkow said: Hi everyone! I would like to limit the number of decimal places to only 2 for the unit price on the product page. Currently there are 6 decimal places shown. Since only the price-ratio is stored in the database, the numbers resulting for the unit price look e.g. like 5.500002 - which does not make a lot of sense to me. In the code I found that the priceFormater is used on the unit_price (class ProductLazyArray line 669 call of function format). However I suspect that the unit_price has the currency symbol already appended. This makes it a string and the priceFormatter does not do anything with it anymore. Are the 6 decimal places intended or is this a bug? Using PS 1.7.6.1 Thanks for any suggestions! Jörg You can set the number of the decimal places here... Never seen it with more than 2! Best regards Link to comment Share on other sites More sharing options...
wahmkow Posted November 24, 2019 Author Share Posted November 24, 2019 Hi PCQUATRO, yes that setting is at 2 in my store too. But it has no effect for the unit price. I guess it is really a bug. Problem is not with the template. Same output shows in the classic template. Must be somewhere in the code. Still searching ... 😞 Best regards Link to comment Share on other sites More sharing options...
PCQUATRO Posted November 24, 2019 Share Posted November 24, 2019 (edited) 30 minutes ago, wahmkow said: Hi PCQUATRO, yes that setting is at 2 in my store too. But it has no effect for the unit price. I guess it is really a bug. Problem is not with the template. Same output shows in the classic template. Must be somewhere in the code. Still searching ... 😞 Best regards Try disabling all extra modules and go on from there.. Have you checked the currencies page!? Best Regards Edited November 24, 2019 by PCQUATRO (see edit history) Link to comment Share on other sites More sharing options...
jacobian64 Posted April 4, 2020 Share Posted April 4, 2020 did anyone found solution for this problem? I am having problem also with 6 decimals places in my invoice. as I need to make it 2 decimals places only. screenshot https://nimb.ws/inb28o Link to comment Share on other sites More sharing options...
MinnaLaa Posted April 6, 2020 Share Posted April 6, 2020 For me these settings work: Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2020 Share Posted April 6, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
wahmkow Posted April 6, 2020 Author Share Posted April 6, 2020 (edited) Actually the solution mentioned by Gerardo in following post solved the problem for me 😉 https://www.prestashop.com/forums/topic/996134-decimals-problems-on-176/ Edited April 6, 2020 by wahmkow made the url a link (see edit history) Link to comment Share on other sites More sharing options...
TamasFelix Posted May 2 Share Posted May 2 I use prestashop 8.1.4 for the website fashionland.ro in operational parameters / Store I can't change the decimals 😂 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now