Protected Member Functions | |
_afterSave () |
Definition at line 37 of file Allow.php.
_afterSave | ( | ) | [protected] |
Check is isset default display currency in allowed currencies Check allowed currencies is available in installed currencies
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 45 of file Allow.php.
00046 { 00047 $exceptions = array(); 00048 foreach ($this->_getAllowedCurrencies() as $currencyCode) { 00049 if (!in_array($currencyCode, $this->_getInstalledCurrencies())) { 00050 $exceptions[] = Mage::helper('adminhtml')->__('Selected allow currency "%s" is not available in installed currencies', Mage::app()->getLocale()->currency($currencyCode)->getName()); 00051 } 00052 } 00053 00054 if (!in_array($this->_getCurrencyDefault(), $this->_getAllowedCurrencies())) { 00055 $exceptions[] = Mage::helper('adminhtml')->__('Default display currency "%s" is not available in allowed currencies', Mage::app()->getLocale()->currency($this->_getCurrencyDefault())->getName()); 00056 } 00057 00058 if ($exceptions) { 00059 Mage::throwException(join("\n", $exceptions)); 00060 } 00061 00062 return $this; 00063 }