This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

format_currency function

Defined in /modules/shop/init/custom_helpers.php, lines 18-21
Author LemonStand eCommerce Inc.
string function format_currency(string $num, integer $decimals=2)
$num string specifies a value to format.
$decimals integer specifies a number of decimal digits. Optional parameter, the default value is 2.
{return} string returns the formatted currency value.
Returns a currency representation of a number. Returns a string containing a numeric value formatted as currency according the system currency settings. You can change the system currency settings on System/Settings/Currency page. Default system currency is USD and the default format is $10,000.00.
The following code outputs a product price.
Price: <?= format_currency($product->price()) ?>