I have subcategory. I want move copy of it to another category. I do following
$copy = clone $category; $copy->setId(null) // Remove the ID. ->save(); $copy->move($parentCategory->getId());
This works, but new category have same name for each store. I have 5 stores with different languages. So category I want to copy have different name for each store.
Any ideas how to copy categories with different names for each store?
Since I've accepted answer I've occurred issue - names weren't save correct for all stores. So I suggest use just
$copy = Mage::getModel('catalog/category');
$copy = clone $category; $copy->setId(null);