This topic is locked
[SOLVED]

 Fatal error Call to undefined function: format_currency()

3/26/2009 6:31:40 PM
Members Template General Questions
W
wypman author

Can anyone assist with this little problem. After failing to install the paypal payments nearly 12 months ago .. I finally decided to sort it once and for all. The new version of PHPRunner 5.1 and the new templates have stirred me into action. So the Regional Settings to English (United Kingdom).
I can register a new user, but when I then login with the user details I receive the following error message instead of the payment option screen.

<b>Fatal error</b>: Call to undefined function: format_currency() in <b>.../members/include/events.php</b> on line <b>123</b>


Error appears to be in this line:

$s=format_currency($data["Price"]) . " " . $data["Label"];


Has anyone got any ideas, or got this working.

J
Jane 3/27/2009

Hi,
thank you for pointing me to this bug.

We'll fix it in the next update.
To make your pages working use following code:

$s=str_format_currency($data["Price"]) . " " . $data["Label"];

W
wypman author 3/27/2009

Thank you that fixed the problem. Still required the code tweaking by adding the following line:

$info.="<input type=\"hidden\" name=\"currency_code\" value=\"GBP\">";


Otherwise is says pounds on the selection, but when you go to the paypal pay page its in USD.
Thank you for your help..