diu1so Posted June 18, 2010 Share Posted June 18, 2010 Hello,most of our prices are in 2,90 format but we neet that this to be in 2,90; the decimal smaller than the rest of the price, and if possible, a little upper.Does somebody have a solution?Thanks. Link to comment Share on other sites More sharing options...
tomerg3 Posted June 19, 2010 Share Posted June 19, 2010 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 More sharing options...
diu1so Posted June 19, 2010 Author Share Posted June 19, 2010 Ok, thanks, i`ll try probably test it tomorrow or monday with 1.25 ps version. I'll notice here the results.If somebody tests it before, please let me know. Link to comment Share on other sites More sharing options...
tomerg3 Posted June 19, 2010 Share Posted June 19, 2010 I put it on my test site http://www.presto-changeo.com/131/product.php?id_product=302 I think it's working well. Link to comment Share on other sites More sharing options...
diu1so Posted June 27, 2010 Author Share Posted June 27, 2010 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 More sharing options...
enagen Posted July 27, 2012 Share Posted July 27, 2012 Sorry for refloat, but want to decrease the size of decimal in prestashop 1.4, and the code is totally different. Some help? Thnks Link to comment Share on other sites More sharing options...
jwd19 Posted September 24, 2016 Share Posted September 24, 2016 Dear, Do someone have a solution for prestashop 1.6 ?We also want smaller decimals on the productpage (we work with combinations) I hope someone can help me! Kindest regards! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now