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

currency Twig filter

Defined in /modules/core/classes/core_twigextension.php, lines 173-173
Author LemonStand eCommerce Inc.
mixed function 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} mixed the function returns the object field value.
Returns a currency representation of a number. The currency filter is a Twig filter equivalent of the format_currency() function. Applies currency formatting to a number. The following example outputs a product price:
{{ product.price()|currency }}
The second optional argument allows to specify the number of decimal digits to return. The next example displays a product price with a single decimal digit:
{{ product.price()|currency(1) }}