I want edit store name and website name programatically, how it is possible?
1 Answer
Updated
For store try this
$storeModel = Mage::getModel('core/store_group');
// Load by store Id:
$storeModel->load($id);
$storeModel->setData('name','Amit');
$storeModel->save();
For Website:
$websiteModel = Mage::getModel('core/website');
$websiteModel->load($WebsiteId);
$websiteModel->setData('name','MYStoreWebsite');
$websiteModel->save();
You can easily do it by shell script. Create a file update.php in your Magento directory and add the following code:
require "YourMagentoDirPath/app/Mage.php";
umask(0);
Mage::app('admin');
$storeModel = Mage::getModel('core/store_group');
// Load by store Id:
$storeModel->load($id);
$storeModel->setData('name','Amit');
$storeModel->save();
$websiteModel = Mage::getModel('core/website');
$websiteModel->load($WebsiteId);
$websiteModel->setData('name','MYStoreWebsite');
$websiteModel->save();
-
Website and store view name is change but store name is not changing.– MathewCommented Sep 22, 2015 at 8:53
-
-