Jump to content

PS 1.7.2 How I can delete the decimals from the prices?


Liliana M

Recommended Posts

Hi,

 

How can I remove the decimals from the prices? :( The new PS 1.7.2 does not have the option or I don't see it.

 

I'm setting up a new online store for Colombia and here in Colombia we don't use decimals.

 

 

I really appreciate your help :) 

 

Regards, 

Link to comment
Share on other sites

I see. Strange that they did that. They even changed the database accordingly.

 

What you can do is changing the code yourself. In classes\currency.php on line 112 you find the following code:

$this->decimals = 1;

Try setting this value to zero.

 

There is a bug on this in the Forge: http://forge.prestashop.com/browse/BOOM-2065

 

Please vote for it. It is not much but it is the only "power" we have to have influence.

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

  • 2 years later...
  • 1 month later...

Hi,

Find translation folder / CLDR and edit file 'main_xx_XX-number' --> "#,##0.###" change to "#,##0" 

Find localization folder /CLDR/Core/common/main - edit file for your language XX.xml

find line ...

<decimalFormat>
                    <pattern>#,##0</pattern>
                </decimalFormat>

and

<currencyFormatLength>
                <currencyFormat type="standard">
                    <pattern>#,##0 ¤</pattern>
                </currencyFormat>
                <currencyFormat type="accounting">
                    <pattern>#,##0 ¤;(#,##0 ¤)</pattern>
                </currencyFormat>
            </currencyFormatLength>

 

don't forget to clear cache file

 

Link to comment
Share on other sites

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