On 11/29/2016 at 5:28 PM, Poppy381 said:Ok the problem is that the Prestashop team change a lot of things with currencies to use cldr.
The decimals feature does not work anymore even if the feature is on the BO.
Well after several hours of research I've find that :
If you want to know the conversion_rate, it's not visible on smarty debug windows but here :
$conversion_rate = $this->context->currency->conversion_rate; $this->context->smarty->assign('conversion_rate',$conversion_rate);Now, for the ROUND price. First configure Prestashop to really round your prices. Even if you round theme and select 0 decimals, 2 decimals will always been displayed. That's because prestashop 1.7 does not refer to your settings (thank you guys...) but to cldr.
If you want to know the format of your currency try this :
$currency_format = $this->context->currency->format; echo $currency_format, break;The format is store in a local file in >Translations>cldr>main-en-US-numbers or main-fr-FR-numbers etc.
Open the file and find "currencyFormats-numberSystem-latn"
"currencyFormats-numberSystem-latn":{"currencySpacing":{"beforeCurrency":{"currencyMatch":"[:^S:]","surroundingMatch":"[:digit:]","insertBetween":"\u00a0"},"afterCurrency":{"currencyMatch":"[:^S:]","surroundingMatch":"[:digit:]","insertBetween":"\u00a0"[spam-filter],"accounting":"#,##0.00\u00a0\u00a4;(#,##0.00\u00a0\u00a4)","standard":"#,##0.00\u00a0\u00a4","unitPattern-count-one":"{0} {1}","unitPattern-count-other":"{0} {1}"}you will find the currency format.
$ format :
standard:\u00a4#,##0.00€ format :
standard: #,##0.00\u00a0\u00a4\u00a4 is the currency sign
\u00a0 is a space
The coma is the thousand(group) separator and The point is the decimal separator.
They are defined at the beginning of the file :
"symbols-numberSystem-latn":{"decimal":".","group":",";If you don't want to see decimals on your shop, just delete ".00" and save the file, and that's all .
I suggest to Prestashop team to allow us to have a variable to display or not decimals instead of doing that .
All the best
Franck
IT works but, it was not detected by "list of modified files" lol