Thousands Separator & Decimals

LiteCart Fan
De Switzerland
Miembro desde mar. 2016

Hello

I have two questions:

1.)
I must have the thousand-separator as " ' ". Not as comma, point or blank. Where can I change this?

2.)
In the shop I see prices for example as "CHF 100" but I must have "CHF 100.00". Amounts like "CHF 100.50" is showing in the shop, but even amounts without decimals not. Where can I setup this?

Best regards,
André

tim
Founder
De Sweden
Miembro desde may. 2013
tim
  1. Decimal separator is set in Admin -> Languages -> Edit language

http://demo.litecart.net/admin/?app=languages&doc=edit_language&page=1&language_code=en

Unfortunately the character needs to be added to the list by editing edit_lanuage.inc.php or you can just tweak the stored value in MySQL table lc_languages using phpMyAdmin.

  1. Currency decimals are set under Admin -> Currencies -> Edit currency
LiteCart Fan
De Switzerland
Miembro desde mar. 2016

Hello TiM

Thank you for your answere.

1.) Solved, I have it changed in the database -> Perfect!

2.) Yes I know, I have two decimals here, but in the frontend I see this:

In Switzerland we must see the CHF 3'420.00 and CHF 1'140.00

Have these settings:

Best regards,
André

tim
Founder
De Sweden
Miembro desde may. 2013
tim

Ouch ppl use to have the opposite problem where litecart is heaven with it's hidden decimals if none.

You will need to tweak the format function in lib_currency.inc.php making sure it doesn't use auto decimals. I'm on my phone and cannot paste any code.

LiteCart Fan
De Switzerland
Miembro desde mar. 2016

Hello Tim

Perfect! Have solved the second issue successfull with change from $decimals = 0; to  $decimals = 2;

Please, can someone take care about this in the further development?

Thank's again and best regards,
André

tim
Founder
De Sweden
Miembro desde may. 2013
tim

Notes taken, we should create an optional setting for this.

Edit: Next version will have a global setting to toggle auto_decimals on or off. So will it support single quote for thousands separator.

De Desconocido
Miembro desde dic. -0001

yeh,

v1.3.4.1 hotfix:
/includes/library/lib_currency.inc.php

Line 177:
$decimals = 0; -> $decimals = 2;

Works.

Thanks for the topic.

De Desconocido
Miembro desde dic. -0001

My online store is multi-currency with different decimal settings for each currency.
Change the $decimals in line 177 will only force the decimal places for all currencies.

If we don't have a global setting to toggle $auto_decimals yet, then I prefer to use this line:

$decimals = (int)self::$currencies[$currency_code]['decimals'];

I hope the next version will be released soon.
Thank you.

Este hilo se ha cerrado debido a una larga inactividad. No es posible publicar en él.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.