/** * Return stores grouped by assigned themes * * @return array */ public function getStoresByThemes() { $storesByThemes = array(); $stores = $this->_app->getStores(); /** @var $store Mage_Core_Model_Store */ foreach ($stores as $store) { $themeId = $this->_design->getConfigurationDesignTheme(Mage_Core_Model_App_Area::AREA_FRONTEND, array('store' => $store)); if (!isset($storesByThemes[$themeId])) { $storesByThemes[$themeId] = array(); } $storesByThemes[$themeId][] = $store; } return $storesByThemes; }