Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Decimals Delimiter Rate Topic   - - - - -

 
  • valentin15
  • Newbie
  • Trial users
  • Join Date: 15-Sep 15
  • 12 posts

Posted 30 January 2018 - 07:47 AM #1

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 !



 
  • Vivek Gupta
  • Senior Member
  • Members
  • Join Date: 09-Jul 15
  • 247 posts

Posted 30 January 2018 - 07:52 AM #2

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....cies/index.html
 


Vivek Gupta 
 


 
  • hummer
  • Advanced Member
  • Members
  • Join Date: 23-Jul 20
  • 75 posts

Posted 10 November 2020 - 10:21 AM #3

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 10 November 2020 - 01:53 PM #4

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • hummer
  • Advanced Member
  • Members
  • Join Date: 23-Jul 20
  • 75 posts

Posted 11 November 2020 - 06:20 AM #5

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.



 
  • Japsa
  • Member
  • Trial users
  • Join Date: 19-Apr 20
  • 15 posts

Posted 08 December 2020 - 03:52 PM #6

@eComLabs

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



 
  • hummer
  • Advanced Member
  • Members
  • Join Date: 23-Jul 20
  • 75 posts

Posted 09 December 2020 - 03:08 PM #7

@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


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11998 posts

Posted 09 December 2020 - 07:58 PM #8

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 10 December 2020 - 04:49 AM #9

 

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)