Skip to content

Magento: Get All Store Views Data

below script is to get all store views data:

Mage::app()->getWebsites();
Mage::app()->getStores();

foreach (Mage::app()->getWebsites() as $website) {
foreach ($website->getGroups() as $group) {
$stores = $group->getStores();
foreach ($stores as $store) {

print_r($store->getData());
}
}
}

example print_r results

Array
(
[store_id] => 1
[code] => default
[website_id] => 1
[group_id] => 1
[name] => English
[sort_order] => 0
[is_active] => 1
[locale_code] => en_US
[home_url] => http://domain.com/index.php/?___store=default
)

Share

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.