Magento get store by storecode
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; }