Currency

$this->currency->set($currency);

Quickly set the user’s currency by the currency code with this.

$this->currency->format($number, $currency = ”, $value = ”, $format = true);

Used for formatting prices to match the layout of the selected currency.

$this->currency->convert($value, $from, $to);

Used for working out the value of something in one currency to another.

$this->currency->getId($currency = ”);

Gets the ID of the currency, leave blank to gett he ID of the selected currency or enter a currency code to choose.

$this->currency->getSymbolLeft($currency = ”);

Gets the left symbol, if any, for displaying next to the price.

$this->currency->getSymbolRight($currency = ”);

Gets the right symbol, if any, for displaying next to the price.

$this->currency->getDecimalPlace($currency = ”);

Gets the symbol which represents a decimal place in the selected currency.

$this->currency->getCode();

Returns the ISO code of the currently selected currency.

$this->currency->getValue($currency = ”);

Returns the value of the selected currency. This is the value used to work out currency rates.

$this->currency->has($currency);

Checks to see that there are active currencies and one has been set.

Last update: Tue, 13 Sep 2022 14:32:15