This project is not covered by Drupal’s security advisory policy.
API module, used for displaying correctly formatted prices.
To use in your code;
- Where
$price
is a price. - And
$currency_code
is a CURRENCY CODE, eg. GBP or USD.
<?php print theme('format_currency', $price, $currency_code); ?>
The module also (optionally) integrates with the currency_api module, so if for example you wanted to show how many EUROS you'd have when exchanging GBP £100;
$base
indicates the base currency of the given price.- The
$currency_code
parameter is always the currency which will be shown.
<?php $price = 100; ?>
<?php $currency_code = 'EUR'; ?>
<?php $base = 'GBP'; ?>
<?php print theme('format_currency', $price, $currency_code, $base); ?>
NOTE: This module is a BETA release. Code-wise it is fine to use on production sites - it's in BETA as a lot of currencies do not have complete configuration yet and (unsurprisingly) the defaults do not suit every one... If you want to get involved, take a look at the format_currency.config.inc file and post your patches to the issue queue.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: E-commerce, Site Structure, Multilingual
- 37 sites report using this module
- Created by pobster on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.