Effectively and for once set decimals control

  • Posts: 639
  • Thank you received: 16
  • Hikashop Business
9 years 3 months ago #239592

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

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

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 3 months ago #239611

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

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

  • Posts: 48
  • Thank you received: 0
9 years 1 month ago #243719

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

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
9 years 1 month ago #243737

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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.059 seconds
Powered by Kunena Forum