Hi everyone hoping I can get some help, how can I export categories from one magento store and import them in another? Thanks
EDIT: to be honest I am looking to export all categories, sub categories, products and product images from one magento site to another… is that possible?
I was thinking that might be the only ansr, I’ve looked all aroudn the forum, found veriouse ways of moving images over but none worked for me… but as far as categories, products, images togeather had know luck… I am unsure that if I just made the categories again they would be the name categorie number that is in the CSV files exported??
I had a similar problem and the way i solved it was to create an export profile listing all the fields i needed using the import/export option from the system menu, I then imported it into my new database, you will need to manually copy the image files across from the media/import in your installation root directory.
Luke Terry Creative Design - 15 December 2008 03:43 PM
Hi everyone hoping I can get some help, how can I export categories from one magento store and import them in another? Thanks
EDIT: to be honest I am looking to export all categories, sub categories, products and product images from one magento site to another… is that possible?
Unfortunately, you will only be able to export the category id, which are pretty much useless unless you have the same category structure on your other website. As you have discovered, the dataflow is not fully cooked yet and is a work in progress. Their has been a few attempts to fix the import aspect of importing categories name. See wiki http://www.magentocommerce.com/wiki/how_to_import_category_structure_with_products_using_dataflow . Hope this helps
To export category names or paths i wrote a small dataflow extension. By adding some xml tags to an advanced profile, you can add the categories to the product export. Unfortunately this module can’t import categories, but I hope it help anyway.
I have been struggling with this issue of exporting categories for a few days. I am partially through solving it but, I have hit my limit in terms of programming skills.
I have managed to get the category tree out of my database using the SOAP Web Services interface using the following method.
**And I am fully aware that I may be doing this all backwards—that being said this is what I have managed to do..
First: I created a web services user in Admin -> Web Services -> Add new user
Second: I created a new Role for that user in Admin-> Web Servivces -> Roles and gave it full access to all services.
Third: I assigned that new role to the new user
My Webservices user is “soaper” and the key or password is also “soaper”
Next I created a script by cobbling together some code fragments I found in the API services page and some other code floating around online.
I saved this code as a PHP file called “get_categories.php” and dropped it in the root folder for my Magento installation. Then to call it, I simply pointed my browser to the file—something like this: http://yourmagentohost/get_categories.php
And boom, it spits out what looks like the xml schema for the category tree with all of your categories and related goodness.
/** * Save category (import) * * @param array $importData * @throws Mage_Core_Exception * @return bool */ public function saveRow(array $importData) { if (empty($importData['store'])) { if (!is_null($this->getBatchParams('store'))) { $store = $this->getStoreById($this->getBatchParams('store')); } else { $message = Mage::helper('catalog')->__('Skip import row, required field "%s" not defined', 'store'); Mage::throwException($message); } } else { $store = $this->getStoreByCode($importData['store']); }
if ($store === false) { $message = Mage::helper('catalog')->__('Skip import row, store "%s" field not exists', $importData['store']); Mage::throwException($message); }
$rootId = $store->getRootCategoryId(); if (!$rootId) { return array(); } $rootPath = '1/'.$rootId; if (empty($this->_categoryCache[$store->getId()])) { $collection = Mage::getModel('catalog/category')->getCollection() ->setStore($store) ->addAttributeToSelect('name'); $collection->getSelect()->where("path like '".$rootPath."/%'");