While Magento did a good thing of creating the ability to import a CSV from within the Magento admin, it still lacks a bit, and it is extremely slow. It has improved in speed since 1.0 came out (it took me 15 hours to import 4500 products), but it still is very slow. It can even be a little overly picky sometimes.
That is why I started learning the eav database setup early, and began importing my own products with my own PHP script. With the first script I made, I was able to import those same 4500 products in 18 seconds instead of 15 hours. That is a time savings of 14 hours, 59 minutes, and 42 seconds.
My script wasn’t at all built smart though. It required a very specific number of columns, in a specific order, and with a specific text delimiter. All of the attribute ids and other variables were all hard-coded into the script, making it tedious to customize for a different system. I just recently learned that the attribute id values for different installations of Magento can be completely different.
So, I am on a mission to create a “smart” product import script. I plan to have different configuration options all at the top of the php script, which would keep the user out of the core and make setting it up easy. My goal is to make it so that you can create a CSV file of your products, with headers that match Magento’s attribute_code in any order you want it in. Even custom attributes that you create will be easily imported.
The script has already been started. Much of the core import features are already done. I took what I already had and gave the script to a friend of mine to test out, and he imported 12,630 products in 60 seconds. But, that script still required a specific column order.
- Imports products – FAST!
- Ability to see the data of your CSV displayed in a table
- Automatic attribute_id lookup
- Includes Mage.php class to create url_key and url_path
- Ability to set default values
- Updates product if it already exists
- Accepts any column order
- Accepts custom attribute values
- Importing images
- Importing products into categories
- Importing tier pricing
- Graphical interface
- Created as a Magento module
I’ll keep you updated. If you have any interest in this project, please let me know – post a comment. Also, if there are any features or ideas you would like to suggest, please let me know too!