89

Product support

Visit this product's website for support.

Categories

Tools for dealing with currency display and conversions. You can configure currencies and converters via the Settings page.

  • Settings → Currencies
  • Settings → Exchange Rates
  • Settings → Site Definitions

Official Documentation

This plugin is partially documented in the official October CMS documentation.

Article Purpose
Currency Twig Filter Formatting Currency in Twig markup
Currency Form Widget Displaying currency as an input field
Currency List Column Displaying currency in a list column

Understanding Currency Definitions

There are multiple currency definition types that are important to operation the Currency plugin. Each definition type is described in more detail below.

Default Currency

The default currency is used when there is no multisite context or when there is no currency set in one of the other definitions. In the currency form widget, if the model does not implement the multisite feature, then the value is stored in the default currency.

Note: The default currency is set by opening the Settings → Currencies page and checking the Default checkbox on a currency listed on this page.

Primary / Base Currency

The primary currency is a base currency that sets the currency for use when writing values in a multisite context. For example, if the model implements the multisite feature, then the value is stored in the primary currency set by the active site.

The primary currency is available in Twig as this.site.base_currency and this.site.base_currency_code.

{{ this.site.base_currency_code }}

Note: The primary currency is set by opening the Settings → Site Definitions page and selecting a currency in the Base Currency dropdown.

{{ product.price|currency({ from: this.site.base_currency_code })}}

Display Currency

The display currency has a specific purpose of converting a currency from its stored value before displaying it.

The display currency is available in Twig as this.site.currency and this.site.currency_code.

{{ this.site.currency_code }}

For example, if a value is stored in the primary currency as USD and the site definition has a display currency of AUD.

{{ product.price|currency({
    from: this.site.base_currency_code,
    to: this.site.currency_code
})}}

This can be shortened by setting the site option to true.

{{ product.price|currency({ site: true })}}

Note: The primary currency is set by opening the Settings → Site Definitions page and selecting a currency in the Display Currency dropdown.

  • Introduction - explains how to get started using the Currency plugin
  • Building Exchange Types - how to implement exchange integration for automated currency conversion
  • Services
    • Currency Manager - services used to format currencies and request the active, default and primary currencies
    • Exchange Manager - manages currency conversion and drivers for exchange types
  • Found the plugin not useful on 9 Oct, 2024

    guys, previous version was incredible, this was total fail... where is fkna formatting ? getting only number when use Currency::convert($amout,'eur') ... no freaking formatting, nothing... before i got nicely formatted number with currency symbol etc.. now. nothing... :( ...

  • Found the plugin not useful on 2 Apr, 2021

    not working for all middle east currencies

  • Found the plugin useful on 9 Mar, 2021

    Hi. Do you have any ideea where to check the currency value update? Since 03.03.2021 the EUR vs RON value is not changed in the database and we didn't made any changes except moving the website from subfolder to main public_html.

    Thank you in advance.

  • Found the plugin useful on 22 Oct, 2020

    How can one add additional converters? Apparently, the available converters don't work for all currencies, eg The Nigerian Naira (NGN)

  • Found the plugin useful on 5 Sep, 2017

    This is a pretty good tool I would def suggest using it.

2.0.5

Fixes base values for Euro formatting

Aug 20, 2024

2.0.4

Fixes the stutter in currency model accessing the code

Aug 15, 2024

2.0.3

Adds base currency selection to site definitions

Aug 12, 2024

2.0.2

Adds currency selection to site definitions

Aug 06, 2024

2.0.1

Fixes bug in migration path

Aug 06, 2024

2.0.0

Major Upgrade to Currency Plugin

Aug 02, 2024

1.0.8

Fixes cache clearing, clearing static attributes on the model

Jan 15, 2024

1.0.7

Fixes compatibility with October CMS v3

Oct 11, 2022

1.0.6

Fixes bug in Currency form widget casting null to 0.00

Mar 27, 2021

1.0.5

Added Italian translation.

Dec 07, 2019

1.0.4

Improvements to currency formatting parameters.

Aug 31, 2018

1.0.3

Add new exchanges Fixer and CoinMarketCap. Yahoo exchange has been discontinued.

Aug 31, 2018

1.0.2

Add currency form widget and list column type.

Jan 26, 2017

1.0.1

First version of Currency

Jul 02, 2016