View Full Version : Remove the last 2 zeros in currency
January 27th, 2009, 07:49 PM
Classifieds shows the currency like this 1,000.00kr
I would like it to show like this 1,000kr we dont use the last 2
January 27th, 2009, 08:41 PM
You dont use cents?
I would have to investigate if there is anything that might help you with that as there is nothing within the program for that.
January 27th, 2009, 09:06 PM
No, we dont use cents, not for many years :)
It would be nice if you could :)
January 28th, 2009, 09:16 AM
well most money has change in the world some use a period and others a comma for the separator so your must be difference. There really is not much we can do with the number_format function in PHP to help.
Now for anywhere in the scripts you find where we format a price you could do something like this. I will use showproduct as a guide add in bold to remove the last 3 digits which would example be .00. You might have to go further and remove the number format as well but try that first.
if ( $askprice > 0 )
$askprice = substr($askprice, 0, -3);
January 29th, 2009, 08:29 AM
Thank you, Chuck
I will give it a try. :)
January 29th, 2009, 10:23 AM
Not a problem enjoy your day.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.