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

pobster’s picture

Status: Active » Closed (works as designed)

Drupal 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

guldi’s picture

not working.

guldi’s picture

sorry, 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

pobster’s picture

Can you check the value of your format_currency_round_whole_numbers variable?

Pobster

guldi’s picture

where?

pobster’s picture

drush vget format_currency_round_whole_numbers

guldi’s picture

Oh, a variable. Sorry didn't get that.
The value is 1.

pobster’s picture

Erm, 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