Public Member Functions | |
getAvailableCurrencies () | |
getCurrencyName ($code) | |
getCurrentCurrencyCode () |
Definition at line 34 of file Data.php.
getAvailableCurrencies | ( | ) |
Retrieve avilable currency codes
Definition at line 41 of file Data.php.
00042 { 00043 $dirtyCodes = $this->getStore()->getAvailableCurrencyCodes(); 00044 $codes = array(); 00045 if (is_array($dirtyCodes) && count($dirtyCodes)) { 00046 $rates = Mage::getModel('directory/currency')->getCurrencyRates( 00047 Mage::app()->getStore()->getBaseCurrency(), 00048 $dirtyCodes 00049 ); 00050 foreach ($dirtyCodes as $code) { 00051 if (isset($rates[$code]) || $code == Mage::app()->getStore()->getBaseCurrency()) { 00052 $codes[] = $code; 00053 } 00054 } 00055 } 00056 return $codes; 00057 }
getCurrencyName | ( | $ | code | ) |
getCurrentCurrencyCode | ( | ) |