![]() |
Formating Currency
Hi gang,
I want to be able to format the currency prices so they dont show any decimal placing: i.e. display "$150" instead of "$150.00" I've been looking at the Math functions and the currency.tpl file but still no joy. Is there a simple fix for this? W |
I've not tried this, but if it was me, I would be looking at changing the database perhaps.
In the pricing table, you have a price field, which has a type of decimal(12,2); if you changed this to remove the 2, you would then not have any decimal points. I would do this via phpmyadmin myself, suggest backing it up first though! |
Not good for tax reasons though...government doesn't like things rounded off :)
|
no doubt worth a look at currency.tpl too
|
Yep - a very simply fix in the end...
Within the currency.tpl file - I just removed the |formatprice:",":"." from Code:
{$config.General.currency_symbol}{$value|abs_value|formatprice:",":"."} That done the trick W |
Quote:
but it also removed the currency symbol. using 4.0.15 |
All times are GMT -8. The time now is 01:46 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.