- Posts: 171
- Thank you received: 4
use currency decimal seperator
12 years 3 months ago #160962
by jesper
use currency decimal seperator was created by jesper
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5.22
-- PHP version -- : 5.3
Hi,
in Denmark we use . as tusind seprator and , as decimal seperator. I can get that to work in the frontend but the client ask for me to change it in the backend so it works the same way there... now i have been searching for this but not found any place i can make it use the current currency defination in the backend...
Is this possible or do i need to change some php to make that work... if so, can you help me with what ?
regards
Jesper
-- Joomla version -- : 2.5.22
-- PHP version -- : 5.3
Hi,
in Denmark we use . as tusind seprator and , as decimal seperator. I can get that to work in the frontend but the client ask for me to change it in the backend so it works the same way there... now i have been searching for this but not found any place i can make it use the current currency defination in the backend...
Is this possible or do i need to change some php to make that work... if so, can you help me with what ?
regards
Jesper
Please Log in or Create an account to join the conversation.
12 years 3 months ago #160968
by nicolas
Replied by nicolas on topic use currency decimal seperator
Hi,
The same currency locale display options are used for the price display on both the frontend and the backend.
You can find them when editing the currency via the menu System>Currencies.
The same currency locale display options are used for the price display on both the frontend and the backend.
You can find them when editing the currency via the menu System>Currencies.
Please Log in or Create an account to join the conversation.
12 years 3 months ago #161076
by jesper
Replied by jesper on topic use currency decimal seperator
hi nicolas.
That is not totaly correct... on the display it is, but if i in an input field puts 123,5 it shows 123, but if i put 123.5 it works.
That is not totaly correct... on the display it is, but if i in an input field puts 123,5 it shows 123, but if i put 123.5 it works.
Please Log in or Create an account to join the conversation.
12 years 3 months ago #161425
by jesper
Replied by jesper on topic use currency decimal seperator
hey nicolas,
any news on this ?
any news on this ?
Please Log in or Create an account to join the conversation.
12 years 3 months ago #161439
by nicolas
Replied by nicolas on topic use currency decimal seperator
Hi,
I thought that you had had your answer already and that it was just a remark from you.
Yes, regardless of whether you use a comma or a point in the currency settings the system will try to convert the price you enter in inputs as a PHP float which always displays the same with a point as decimal separator: www.php.net/manual/en/language.types.float.php
So it's normal that in the inputs in the backend you see the prices the way that PHP supports them, while when it is displayed directly on the page as a price, with the currency, you get it in the format configured in the currency.
I thought that you had had your answer already and that it was just a remark from you.
Yes, regardless of whether you use a comma or a point in the currency settings the system will try to convert the price you enter in inputs as a PHP float which always displays the same with a point as decimal separator: www.php.net/manual/en/language.types.float.php
So it's normal that in the inputs in the backend you see the prices the way that PHP supports them, while when it is displayed directly on the page as a price, with the currency, you get it in the format configured in the currency.
Please Log in or Create an account to join the conversation.
12 years 3 months ago #161535
by jesper
Replied by jesper on topic use currency decimal seperator
so in other words, the only way to do this, is doing some sort of javascript replace on submit to make this work.
the problem is, that in all other programs that uses in windows you can use , as decimal seperator, but you can't in hikashop.... if you sit in many programs changing numbers and is used to using , you will forget it in hikashop and thereby get wrong price in it...
gonna look into fixing this by javascript live replace
the problem is, that in all other programs that uses in windows you can use , as decimal seperator, but you can't in hikashop.... if you sit in many programs changing numbers and is used to using , you will forget it in hikashop and thereby get wrong price in it...
gonna look into fixing this by javascript live replace
Please Log in or Create an account to join the conversation.
Time to create page: 0.202 seconds