A nice quote by Tywin Lannister taken from A Storm of Sword book.
The greatest fools are ofttimes more clever then the men who laugh at them.
A nice quote by Tywin Lannister taken from A Storm of Sword book.
The greatest fools are ofttimes more clever then the men who laugh at them.
About MagNotes Series In this blog I have always shared about what I’ve learned on Magento, which I felt is taken me one step closer to understanding Magento and Magento development. But during the course of time, I bump on some elementary things which are absolutely required. So just for those elementary things I’ve decided to create a series (MagNotes Series) , for myself as a reference or for whoever think this is helpful.[source lang=”php”] protected function _getStoreByCode($storeCode) { $stores = array_keys(Mage::app()->getStores()); foreach($stores as $id){ $store = Mage::app()->getStore($id); if($store->getCode()==$storeCode) { return $store; } } return false; } [/source]
About MagNotes Series In this blog I have always shared about what I’ve learned on Magento, which I felt is taken me one step closer to understanding Magento and Magento development. But during the course of time, I bump on some elementary things which are absolutely required. So just for those elementary things I’ve decided to create a series (MagNotes Series) , for myself as a reference or for whoever think this is helpful.[source lang=”php”] // Get all the locale options $locale = new Mage_Adminhtml_Model_System_Config_Source_Locale(); $localSource = $locale->toOptionArray(); // Change Options array to one dimentional array $localSourceCodes = array(); foreach ($localSource as $source) { $localSourceCodes [$source [‘value’]] = $source [‘label’]; } [/source]
In this blog I have always shared about what I’ve learned on Magento, which I felt is taken me one step closer to understanding Magento and Magento development. But during the course of time, I bump on some elementary things which are absolutely required. So just for those elementary things I’ve decided to create a series (MagNotes Series) , for myself as a reference or for whoever think this is helpful.[source lang=”php”] Mage::app()->getStore(Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID); [/source]