View Full Version : How to disable decimal digits in price field?
avorob
02-19-2003, 09:35 PM
Would anybody know how to disable displaying decimal digits in a price fild as well as how to prevent chopping off numbers when someone enter a number in 000,000 or 000 000 form
Thanks.
avorob
02-21-2003, 04:58 PM
I'm replying to myself......
in $config[money_sign]".number_format($field_value, 0, '.', ',');
change from 2 to 0
Anonymous
03-03-2003, 08:06 PM
In my Common.php I've got the following and my search / browse still shows prices with .00 on the end. Have I missed something?
function money_formats ($number)
{
global $config;
// formats prices correctly
// defaults to $123, but other folks in other lands do it differently
// uncomment the correct one
$output = $config[money_sign].$number; // usa, uk - $123,345
//$config[money_sign]".number_format($field_value, 0, '.', ',');
// $output = "$number $config[money_sign]"; // germany, spain -- 123.456,78 €
// $output = "$config[money_sign] $number"; // honduras -- € 123,456.78
return $output;
}
avorob
03-05-2003, 01:09 PM
change to:
//$output = $config[money_sign].$number; // usa, uk - $123,345
$config[money_sign]".number_format($field_value, 0, '.', ',');
Anonymous
04-05-2003, 05:58 AM
I changed in common.php file the line to
$config[money_sign]".number_format($field_value, 0, '.', ',');
but still I have the two decimals on price line.
There is another place where I have to make the changes? If someone can help, please do so. Thanks
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.