Jump to content

Smaller decimals


Recommended Posts

I haven't tested this too much, so make sure you do...

Edit /classes/Tools.php lines 251-254 to match the code below, and you can change the size (10) to anything you want.

       if ($no_utf8)
           return str_replace('€', chr(128), $ret);
       $des_sep = ".";
       if ($c_format == 2 || $c_format == 4)
           $des_sep = ",";
       if (strstr($ret, $des_sep) !== false)
       {
           $tmp_ret = explode($des_sep, $ret);
           $tmp_dec = explode(" ",$tmp_ret[1]);
           $ret = $tmp_ret[0]."".$des_sep.$tmp_dec[0]."".(sizeof($tmp_dec) == 2?" ".$tmp_dec[1]:"");
       }
       return $ret;



I just edited this code, make sure you get the current version

Link to comment
Share on other sites

I have version 1.25:
This code you changed?

if ($no_utf8)
           return str_replace('€', chr(128), $ret);
       return $ret;
   }

   static public function displayPriceSmarty($params, &$smarty)
   {
       $currency = new Currency(intval($params['currency']));
       if (Validate::isLoadedObject($currency))
           return self::displayPrice($params['price'], $currency, false, false);
       return 0;
   }

Link to comment
Share on other sites

  • 2 years later...
  • 4 years 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...