- Posts: 640
- Thank you received: 16
Effectively and for once set decimals control
- PeterChain
-
Topic Author
- Offline
Less
More
10 years 4 months ago #239592
by PeterChain
Effectively and for once set decimals control was created by PeterChain
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
Is there a simple single way to configure decimal number treatment for currency and for sizes, and by extension to everything ?
It seems to me like I am missing one main place to manage this.
I have prices set to 2 decimals with ,comma, but when I enter non tax price the tax one gets shown with .dot.
Then if I enter a entire price like 10 € it shows 10 € but I want to show 10,00 €
For sizes I get 5 numbers after the .dot. but I want 2 numbers after the ,comma,
MSRP price shows with 5 decimals after .dot. although my currency configuration is set to 2 after ,comma, and although non MSRP prices show right in number of decimals but wrong with ,comma, and .dot.
Then form frontend HikaMarket to Backend everything changes again
I wil not go further as I think the problem is clear enough, I don't find a consistent way to setup this effectively, specially because input boxes accept and understan my ,comma, but they insist on displaying .dot. after refresh.
Thank you and sorry if it was too long.
-- Joomla version -- : 3.5.1
Is there a simple single way to configure decimal number treatment for currency and for sizes, and by extension to everything ?
It seems to me like I am missing one main place to manage this.
I have prices set to 2 decimals with ,comma, but when I enter non tax price the tax one gets shown with .dot.
Then if I enter a entire price like 10 € it shows 10 € but I want to show 10,00 €
For sizes I get 5 numbers after the .dot. but I want 2 numbers after the ,comma,
MSRP price shows with 5 decimals after .dot. although my currency configuration is set to 2 after ,comma, and although non MSRP prices show right in number of decimals but wrong with ,comma, and .dot.
Then form frontend HikaMarket to Backend everything changes again
I wil not go further as I think the problem is clear enough, I don't find a consistent way to setup this effectively, specially because input boxes accept and understan my ,comma, but they insist on displaying .dot. after refresh.
Thank you and sorry if it was too long.
Please Log in or Create an account to join the conversation.
10 years 4 months ago #239611
by nicolas
Replied by nicolas on topic Effectively and for once set decimals control
Hi,
There is no single option to have everything display the same.
HikaShop gives the float value in the input. So you see the price with a comma or a dot based on how your PHP locale is configured to display floating numbers:
mark-story.com/posts/view/php-floats-localization-and-landmines
And when HikaShop displays a price with the currency, it uses the decimal separator setting of the currency.
So what you want is to modify the locale of your PHP so that it display the floats like you want:
php.net/manual/en/function.setlocale.php
There is no single option to have everything display the same.
HikaShop gives the float value in the input. So you see the price with a comma or a dot based on how your PHP locale is configured to display floating numbers:
mark-story.com/posts/view/php-floats-localization-and-landmines
And when HikaShop displays a price with the currency, it uses the decimal separator setting of the currency.
So what you want is to modify the locale of your PHP so that it display the floats like you want:
php.net/manual/en/function.setlocale.php
Please Log in or Create an account to join the conversation.
10 years 3 months ago #243719
by Nabo
Replied by Nabo on topic Effectively and for once set decimals control
hi,
it is possible to change the decimals from dot to comma in the productform of the vendor front end? i edit the currency, so in the shop everything is okay, but some vendors make a dot for the group separator (like its typical for europa) and than we have the decimal seperator on the wrong place.
for example:
typing in the productform: 2.600
saved price is: 2,6
correct price must be: 2.600,00
thx
it is possible to change the decimals from dot to comma in the productform of the vendor front end? i edit the currency, so in the shop everything is okay, but some vendors make a dot for the group separator (like its typical for europa) and than we have the decimal seperator on the wrong place.
for example:
typing in the productform: 2.600
saved price is: 2,6
correct price must be: 2.600,00
thx
Please Log in or Create an account to join the conversation.
10 years 3 months ago #243737
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Effectively and for once set decimals control
Hi,
The price edition, in HikaMarket or in HikaShop is not related to any "currency formatting".
It does not accept spaces or "thousand separator".
If you enter a coma or a point ; it will consider it as your decimal separator.
Regards,
The price edition, in HikaMarket or in HikaShop is not related to any "currency formatting".
It does not accept spaces or "thousand separator".
If you enter a coma or a point ; it will consider it as your decimal separator.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.168 seconds