Jump to content

Decimals problems on 1.7.6


m0ttan

Recommended Posts

Hy all. I have a strange issue:

On back office i have set number of decimals to 0 and no effect on front office or back office also (decimals are shown in FO with 2 decimals and in BO number of decimals for price without tax is 6! and with tax is 2). 

On root/translations/cldr/main--ro-RO--numbers i have "standard":"#,##0\u00a0\u00a4 (i use RO language).

I have tried to change into 1, 2, or any value for decimals in BO also on cldr but no result.

This problem appeared after updating from 1.7.5 to 1.7.6.

 

Cleared cached, etc..

 

Similar problems or just me?

Link to comment
Share on other sites

  • 2 weeks later...

the same thing happened to me, 6 decimals appeared to me ...

go directly to the database .. and edit this table ps_currency in the precision column is where you will put the number of decimals you want to appear

 

also take a look at this new ps_currency_lang table where you can change the symbol, ... in my case it was $ to MXN

primero.jpg

base.jpg

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thank you very much! 

I had similar problem with my Turkish website. 

Also i had to clear the numeric_iso_code   because of my payment module it was bugging the bank's website. 

 

I mean I cleared the (0) number... And everything went normal... 

  • Thanks 1
Link to comment
Share on other sites

On 7/28/2019 at 8:25 PM, Gerardo Martinez G said:

the same thing happened to me, 6 decimals appeared to me ...

go directly to the database .. and edit this table ps_currency in the precision column is where you will put the number of decimals you want to appear

 

also take a look at this new ps_currency_lang table where you can change the symbol, ... in my case it was $ to MXN

primero.jpg

base.jpg

Thanks! this solved my problem!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 2 months later...
  • 1 month later...
On 9/11/2019 at 7:02 PM, Danikcorp said:

Thank you.

I had a problem with this on my site officeplushome.com on PS 1.7.6.2

It tooks 3 days to find this solution.

Thanks again

Hi Danikcorp,

I am also on 1.7.6.2... Did you find a solution for this issue? I dont have a precision column on ps_currency table... How did you manage it?

Link to comment
Share on other sites

  • 1 month later...

Hi Diverest,

 I used solution from Gerardo Martinez to mu site officeplushome.com

 

Best regards

On 7/28/2019 at 8:25 PM, Gerardo Martinez G said:

the same thing happened to me, 6 decimals appeared to me ...

go directly to the database .. and edit this table ps_currency in the precision column is where you will put the number of decimals you want to appear

 

also take a look at this new ps_currency_lang table where you can change the symbol, ... in my case it was $ to MXN

spacer.pngspacer.png

primero.jpg

base.jpg

 

Edited by Danikcorp (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...
4 hours ago, Gerardo Martinez G said:

put a screen where is your error, and version of prestashop

The Kuwaiti dinar  is sub-divided into 1,000 fils, so the price must displayed as follow: 1.540 this equal one dinar and 540 fils, in prestashop this showed as 1.54

We are working on the last version 1.7.6.4 and we tried to modify the xml files in 'root/localization/CLDR/core/common/main' with no effect.

 

Untitled.png

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 2 weeks later...
  • 3 months later...

You can use sprintf command to fix the problem in invoice if you want.

example : {sprintf("%.3f", $var)}

3f = 3 decimals - 2f = 2 decimals - 0f = 0 decimals etc.

$var is your variable that you want to fix.

Invoice variables are in folder pdf under prestashop root folder and they begin with invoice.

If someone wants help how to create specific invoice , don't hesitate to send me your needs. I'll be happy to help you.

Edited by pdasou1968 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hello All.

Simple solution: 

|replace:',00':''

So for example: 

{$product.price|replace:',00':''}

On Front Office prices are without decimals. On BO are still with decimals (its good for invoices, where you shoud have 2 or more decimals)

But you have to change it everywhere, where you want remove decimals.

Cheers

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 6 months later...
  • 2 months later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...