Mage_Adminhtml_Block_Sales_Order_Create_Data Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sales_Order_Create_Data:

Mage_Adminhtml_Block_Sales_Order_Create_Abstract Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getAvailableCurrencies ()
 getCurrencyName ($code)
 getCurrentCurrencyCode ()


Detailed Description

Definition at line 34 of file Data.php.


Member Function Documentation

getAvailableCurrencies (  ) 

Retrieve avilable currency codes

Returns:
unknown

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  ) 

Retrieve curency name by code

Parameters:
string $code
Returns:
string

Definition at line 65 of file Data.php.

00066     {
00067         return Mage::app()->getLocale()->currency($code)->getName();
00068     }

getCurrentCurrencyCode (  ) 

Retrieve current order currency code

Returns:
string

Definition at line 75 of file Data.php.

00076     {
00077         return $this->getStore()->getCurrentCurrencyCode();
00078     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:59 2009 for Magento by  doxygen 1.5.8