Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Directory_Block_Adminhtml_Frontend_Currency_Base
  • Mage_Directory_Block_Adminhtml_Frontend_Region_Updater
  • Mage_Directory_Block_Currency
  • Mage_Directory_Block_Data
  • Mage_Directory_CurrencyController
  • Mage_Directory_Helper_Data
  • Mage_Directory_Helper_Url
  • Mage_Directory_Model_Country
  • Mage_Directory_Model_Country_Api
  • Mage_Directory_Model_Country_Api_V2
  • Mage_Directory_Model_Country_Format
  • Mage_Directory_Model_Currency
  • Mage_Directory_Model_Currency_Filter
  • Mage_Directory_Model_Currency_Import_Abstract
  • Mage_Directory_Model_Currency_Import_Webservicex
  • Mage_Directory_Model_Mysql4_Country
  • Mage_Directory_Model_Mysql4_Country_Collection
  • Mage_Directory_Model_Mysql4_Country_Format
  • Mage_Directory_Model_Mysql4_Country_Format_Collection
  • Mage_Directory_Model_Mysql4_Currency
  • Mage_Directory_Model_Mysql4_Currency_Collection
  • Mage_Directory_Model_Mysql4_Region
  • Mage_Directory_Model_Mysql4_Region_Collection
  • Mage_Directory_Model_Observer
  • Mage_Directory_Model_Region
  • Mage_Directory_Model_Region_Api
  • Mage_Directory_Model_Region_Api_V2
  • Mage_Directory_Model_Resource_Country
  • Mage_Directory_Model_Resource_Country_Collection
  • Mage_Directory_Model_Resource_Country_Format
  • Mage_Directory_Model_Resource_Country_Format_Collection
  • Mage_Directory_Model_Resource_Currency
  • Mage_Directory_Model_Resource_Region
  • Mage_Directory_Model_Resource_Region_Collection

Exceptions

  • Mage_Directory_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Directory_Model_Currency

Currency model

Varien_Object
Extended by Mage_Core_Model_Abstract
Extended by Mage_Directory_Model_Currency
Package: Mage\Directory
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Directory/Model/Currency.php
Methods summary
protected
# _construct( )
public string
# getCode( )

Get currency code

Get currency code

Returns

string
public
# getCurrencyCode( )
public array
# getRates( )

Currency Rates getter

Currency Rates getter

Returns

array
public Mage_Directory_Model_Currency
# setRates( array $rates )

Currency Rates setter

Currency Rates setter

Parameters

$rates
array
Currency Rates

Returns

Mage_Directory_Model_Currency
public Mage_Directory_Model_Currency
# load( string $id, string $field = null )

Loading currency data

Loading currency data

Parameters

$id
string
$id
$field
string
$field

Returns

Mage_Directory_Model_Currency

Overrides

Mage_Core_Model_Abstract::load()
public float
# getRate( string $toCurrency )

Get currency rate (only base=>allowed)

Get currency rate (only base=>allowed)

Parameters

$toCurrency
string
$toCurrency

Returns

float
public float
# getAnyRate( string $toCurrency )

Get currency rate (base=>allowed or allowed=>base)

Get currency rate (base=>allowed or allowed=>base)

Parameters

$toCurrency
string
$toCurrency

Returns

float
public float
# convert( float $price, string $toCurrency = null )

Convert price to currency format

Convert price to currency format

Parameters

$price
float
$price
$toCurrency
string
$toCurrency

Returns

float
public Mage_Directory_Model_Currency_Filter
# getFilter( )

Get currency filter

Get currency filter

Returns

Mage_Directory_Model_Currency_Filter
public string
# format( float $price, boolean $options = array(), mixed $includeContainer = true, mixed $addBrackets = false )

Format price to currency format

Format price to currency format

Parameters

$price
float
$price
$options
boolean
$includeContainer
$includeContainer
$addBrackets

Returns

string
public string
# formatPrecision( float $price, integer $precision, array $options = array(), boolean $includeContainer = true, boolean $addBrackets = false )

Apply currency format to number with specific rounding precision

Apply currency format to number with specific rounding precision

Parameters

$price
float
$price
$precision
integer
$precision
$options
array
$options
$includeContainer
boolean
$includeContainer
$addBrackets
boolean
$addBrackets

Returns

string
public
# formatTxt( mixed $price, mixed $options = array() )
public
# getOutputFormat( )
public
# getConfigAllowCurrencies( )

Retrieve allowed currencies according to config

Retrieve allowed currencies according to config

public
# getConfigDefaultCurrencies( )

Retrieve default currencies according to config

Retrieve default currencies according to config

public
# getConfigBaseCurrencies( )
public array
# getCurrencyRates( string $currency, array $toCurrencies = null )

Retrieve currency rates to other currencies

Retrieve currency rates to other currencies

Parameters

$currency
string
$currency
$toCurrencies
array
$toCurrencies

Returns

array
public object
# saveRates( array $rates )

Save currency rates

Save currency rates

Parameters

$rates
array
$rates

Returns

object
Methods inherited from Mage_Core_Model_Abstract
_afterDelete(), _afterDeleteCommit(), _afterLoad(), _afterSave(), _beforeDelete(), _beforeLoad(), _beforeSave(), _clearData(), _clearReferences(), _getEventData(), _getResource(), _hasModelChanged(), _init(), _protectFromNonAdmin(), _setResourceModel(), afterCommitCallback(), afterLoad(), cleanModelCache(), clearInstance(), delete(), getCacheIdTags(), getCacheTags(), getCollection(), getEntityId(), getId(), getIdFieldName(), getResource(), getResourceCollection(), getResourceName(), isObjectNew(), save(), setId()
Constants summary
string XML_PATH_CURRENCY_ALLOW 'currency/options/allow'
#

CONFIG path constants

CONFIG path constants

string XML_PATH_CURRENCY_DEFAULT 'currency/options/default'
#
string XML_PATH_CURRENCY_BASE 'currency/options/base'
#
Properties summary
protected mixed $_filter
#
protected array $_rates
#

Currency Rates

Currency Rates

Properties inherited from Mage_Core_Model_Abstract
$_cacheTag, $_dataSaveAllowed, $_eventObject, $_eventPrefix, $_isObjectNew, $_resource, $_resourceCollectionName, $_resourceName
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0