I want to change some data of all categories (all store views).
This is my code:
$category = Mage::getModel('catalog/category');
$tree = $category->getTreeModel();
$tree->load();
$ids = $tree->getCollection()->getAllIds();
asort($ids);
$categories = array();
if($ids) {
foreach ( $ids as $id ) {
$cat = $category->load($id);
if($cat->getId()) {
$cat->setName($cat->getName().' add some text');
$cat->save();
}
}
}
Unfortunately I get only the data of the second language.
I need to change data of all languages (store views).
Does anyone has an idea?
Best Answer