-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currency format inconsistent #4009
Comments
@jamescowie thank you reporting, we have created MAGETWO-51790 to investigate and fix. |
@jaimestuardo , thank you for reporting the issue. Unfortunately, not all parts of Magento use intl php extension to get local information. Some parts still using Zend_Locale. Since you modified Zend files, you got incorrect behavior. We have a ticket in our backlog to cleanup the code and make it more consistent, but this refactoring will take some time. For now, you can pluginize method |
Hi Okorshenko, For "pluginize" you mean I can create a class under /app/code/[MyCompany]/[MyPlugin] that implements FormatInterface and the system will automatically call my own getPriceFormat method? |
Hi @jaimestuardo , here is a documentation for Magento 2 plugins. http://devdocs.magento.com/guides/v2.0/extension-dev-guide/plugins.html |
[EngCom] Public Pull Requests - GraphQL
I have the issue with currency format. First, in order to configure my currency to have no decimal numbers, I have modified 3 files in /vendor/magento/zendframework1/library/Zend/Locale/Data: es.xml, es_ES.xml and es_CL.xml (the latter just in case, because locale set is es_ES)
In es.xml I have:
<currencyFormats numberSystem="latn"> <currencyFormatLength> <currencyFormat type="standard"> <pattern>¤ #,##0</pattern> </currencyFormat> <currencyFormat type="accounting"> <pattern>¤ #,##0</pattern> </currencyFormat> </currencyFormatLength> <unitPattern count="one">{0} {1}</unitPattern> <unitPattern count="other">{0} {1}</unitPattern> </currencyFormats>
In both es_ES.xml and es_CL.xml I have:
<currencyFormats numberSystem="latn"> <currencyFormatLength> <currencyFormat type="standard"> <pattern>¤ #,##0;¤ -#,##0</pattern> </currencyFormat> </currencyFormatLength> </currencyFormats>
I have removed /var/cache and /var/view_preprocessed, and even, removed browser cache.
The result: the number placed using JavaScript are not formatted correctly:
Regards
Jaime
The text was updated successfully, but these errors were encountered: