3

I am working on one website - multiple stores platform. How i can get store details by website id.

1 Answer 1

8

you can get it like that...

$websiteId=1;
    $website = Mage::getModel('core/website')->load($websiteId); 
    foreach ($website->getGroups() as $group) {
            $stores = $group->getStores();
            foreach ($stores as $store) {
                echo $store->getId() ." ".$store->getName()."<br/>";
            }
        }
1
  • 1
    Working correctly....
    – Mathew
    Commented Sep 8, 2015 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.