Decimals Delimiter

Hi,

I'm looking to change the decimals to "," instead of a point and the thousands to a "." as we are using our website in Europe.


Thanks !

Hi,

I'm looking to change the decimals to "," instead of a point and the thousands to a "." as we are using our website in Europe.


Thanks !

Please check here: http://docs.cs-cart.com/4.7.x/user_guide/currencies/index.html

Hi all,

I would like to bring this topic to the top as I have an additional question.

Is there a possibility to make language dependent definitions of thousands separator and decimals separator?

E.g. 1234 EUR and 56 cent should be displayed...

... in German as 1.234,56

... in English as 1,234.56

Looking forward to your answer.

Best regards

hummer

I am afraid, it is not possible out of the box

Thank you for your help eComLabs, which I always appreciate very much.

It is surprising that this missing feature is not in greater demand. Formatting numbers (prices) incorrectly in at least one language does not look very professional.

@eComLabs

I endorse the request. I come from Germany and yes, I would also need this adjustment.

@eComLabs

I endorse the request. I come from Germany and yes, I would also need this adjustment.

Is there a feature wish list where such things can be stated?

Actually a use of the PHP function numfmt_format_currency could solve the problem quickly and easily, right?

$currency_abbreviation = 'EUR'; 
$localization = 'de_DE';
$price_format = numfmt_create($localization, NumberFormatter::CURRENCY );
$price_to_print = numfmt_format_currency($price_format, $row['price'], $currency_abbreviation);
What do you think?
Best regards
hummer

One simpler option would be to utilize language variables for the currency separator. Currently it's defined in the currency definition but seems that euro then becomes language dpendent. The value could be initialized when the store is first configured and admin could then set it for their own languages. I.e.

"currency_decial" = ','

And then it could be used in the currency functions that return formatted values.

But isn't it easier to just go into the currency setup and change it to what you want for your primary customers? I.e. does it really matter if it's E60,13 or 60.13E for a typical customer? I'm guessing Euro is the only currency with formats dependent on language.

Is there a feature wish list where such things can be stated?

Actually a use of the PHP function numfmt_format_currency could solve the problem quickly and easily, right?

$currency_abbreviation = 'EUR'; 
$localization = 'de_DE';
$price_format = numfmt_create($localization, NumberFormatter::CURRENCY );
$price_to_print = numfmt_format_currency($price_format, $row['price'], $currency_abbreviation);
What do you think?
Best regards
hummer

You can try your code here

/app/functions/smarty_plugins/modifier.format_price.php

Unfortunately, it does not have hooks