Bulk Upload Categories to Magento

One of those pain points in Magento is bulk uploading Categories. I know there’s this solution and also this bulk category solution, which are both basically the same thing. I actually feel more comfortable using Python and it also means that I don’t have to install Zend on my local machine to access the remote API.

One struggle I did get stuck on is the “Access Denied” message when connecting. A lot of people are having issues with it. My issue was that I had used the same username for my API access as I use to login to the admin in my testing. As soon as I changed from that, I overcame that issue.

Anyway, I stumbled across this Python Magento library and saw it had a number of useful functions already in it. So I decided to hack away and add to it.

So far, I have added a function to retrieve the list of categories and write them to a file from the catelog_category.tree api call and finally, as per my original intention, write a function to bulk upload categories from a CSV file.

I’ve never contributed code to a project before so if I get these changes in, it’s my first public contribution.. until that happens, you can hit me up for the code and a sample CSV file.

I might add: Python xmlrpc is beautiful to work with and gives a great deal of flexibility for building a gui on top of this. Working with the Magento API was nice also.

Published by salubrium

I am a Systems Administrator based in Sydney, Australia with some hugely varied interests: Topics covered are Virtualization, Web Hosting, Remote Desktop, Security and Backups, PHP, Python, MVC Frameworks, SEO

Leave a comment

Your email address will not be published. Required fields are marked *