Is it possible to have a setup script do:
- Rename the default website
- Rename the default store group
- Rename the default store view
- Add another store view to a store group
- Add another store group to a website
We have vagrant boxes and when we on board a new developer we need these things to occur so that we don't have to create them manually.
This is what we've got so far:
Mage::register('isSecureArea', true);
// Remove default website, store, and store view
$defaultWebsiteModel = Mage::getModel('core/website');
$defaultStoreGroupModel = Mage::getModel('core/store_group');
$defaultStoreView = Mage::getModel('core/store');
Mage::unregister('isSecureArea');
Best Answer
Yes, websites, store groups and stores are models like any others and you can create and modify them in install scripts.
Here is an example that creates a new website with store group, root category and store:
To rename an existing website, its default store group and store view, you can get it from the app model:
This should help you to do anything from your list.