can I use install scripts to configure multiple stores and views?

Can I find any examples? thanks

1 Answer 1


To add a store use the code below:

/** @var $website Mage_Core_Model_Website */
$website = Mage::getModel('core/website');

/** @var $storeGroup Mage_Core_Model_Store_Group */
$storeGroup = Mage::getModel('core/store_group');

/** @var $store Mage_Core_Model_Store */
$store = Mage::getModel('core/store');

Thanks to Zyava for providing this answer

  • 1
    Sorry, is that an install or data script? thanks
    – apedic
    Commented Jan 27, 2015 at 14:22

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.