use currency decimal seperator

  • Posts: 171
  • Thank you received: 4
11 years 2 months ago #160962

-- 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

Please Log in or Create an account to join the conversation.

  • Posts: 84298
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #160968

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.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 2 months ago #161076

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.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 2 months ago #161425

hey nicolas,

any news on this ?

Please Log in or Create an account to join the conversation.

  • Posts: 84298
  • Thank you received: 13697
  • MODERATOR
11 years 2 months ago #161439

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.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 2 months ago #161535

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum