I tried to use the Format Currency module but it allways returns "Invalid currency given."
Tested with the statement:
print theme('format_currency','1.5','USD');
as well as EUR and GBP.
I tried to use the Format Currency module but it allways returns "Invalid currency given."
Tested with the statement:
print theme('format_currency','1.5','USD');
as well as EUR and GBP.
Comments
Comment #1
pobster commentedDrupal 7 theme function calls work differently to >= D6.
Use
theme('format_currency', array('price' => '1.5', 'param' => 'USD'));(and 'base' => 'GBP' if required).I have absolutely no recollection of how far I got with developing this for D7, please give me a nudge if it works or not.
Thanks,
Pobster
Comment #2
guldi commentednot working.
Comment #3
guldi commentedsorry, working.
but no digits after decimal deparator if it's a round number.
eg. number: 3434 formated: CHF 3'434 instead of CHF 3'434.00
thanks anyway
Comment #4
pobster commentedCan you check the value of your format_currency_round_whole_numbers variable?
Pobster
Comment #5
guldi commentedwhere?
Comment #6
pobster commenteddrush vget format_currency_round_whole_numbers
Comment #7
guldi commentedOh, a variable. Sorry didn't get that.
The value is 1.
Comment #8
pobster commentedErm, so do I need to spell this one out? ;o) Look at the settings page, you have "Use whole numbers" set to TRUE. Unset it and... Well...
Pobster