2017 © Pedro Peláez
 

october-plugin currency

Currency plugin for OctoberCMS

image

responsiv/currency

Currency plugin for OctoberCMS

  • Sunday, November 19, 2017
  • by october
  • Repository
  • 2 Watchers
  • 7 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Currency plugin

Tools for dealing with currency display and conversions. You can configure currencies and converters via the Settings page., (*1)

  • Settings \ Currencies
  • Settings \ Currency converters

Formatting currency

You may call the currency facade in PHP using Currency::format or in Twig using the |currency filter., (*2)

<?= Currency::format(10) ?>

{{ 10|currency }}

This method takes an options argument, as an array that supports various values., (*3)

  • to: To a given currency code
  • from: From a currency code
  • format: Display format. Options: long, short, null.

For example, to convert an amount from USD to AUD:, (*4)

Currency::format(10, ['from' => 'USD', 'to' => 'AUD']);

To display a currency in long or short format, (*5)

// $10.00 USD
Currency::format(10, ['format' => 'long']);

// $10
Currency::format(10, ['format' => 'short']);

Currency Form Widget

This plugin introduces a currency form field called currency. The form widget renders a text field that displays the currency symbol. When the field is shown as a preview, the number is formatted using the primary currency settings., (*6)

Usage:, (*7)

# ===================================
#  Form Field Definitions
# ===================================

fields:
    total_amount:
        label: Total amount
        type: currency
        format: short

Currency List Column

This plugin introduces a currency list column called currency. The value is formatted using the primary currency settings., (*8)

# ===================================
#  List Column Definitions
# ===================================

columns:
    total_amount:
        label: Loan amount
        type: currency

The Versions

19/11 2017

dev-master

9999999-dev https://octobercms.com/plugin/responsiv-currency

Currency plugin for OctoberCMS

  Sources   Download

The Requires

 

by Samuel Georges

cms currency october responsiv