amartinez, you’re a life saver! I’ve been struggling with this for days.
One quick question…
I had created the products (simple and configurable) manually and images were uploaded.
Catalog looks fine and images render correctly.
I did an export using Profiles...Export All Products
I then deleted the products in the catalog.
I added the required columns to the csv and followed the rest of your steps to import.
The simple and configurable items are importing with the correct relationships and visibility,
but the image entries in the Product are empty. I verified the image columns in the csv and
verified that the image files haven’t moved on the file system.
That’s the thing that’s wierd… the images are there in the right place and the image path is in the csv.
It’s just that during the import, the image path in the csv doesn’t populate the product entry in the catalog.
amartinez—thank you so much for this. you have helped so much.
I am having trouble with the image portion as well. Once I go through, I have ALL images listed in the CSV and magento puts all the images in the right folders from media/import to /media/catalog/product etc etc and in the backend, the images are uploaded and the radio buttons are chosen correctly. HOWEVER, “excluded” is checked in the backend, thus not showing any of my product on the front end. Also, when I uncheck “exclude”, the image remains the magento default placeholder image. What am I doing wrong or what can we do to fix this issue?
Anyone else having problems with the images? Has anyone completely figured out the images correctly?
In your example, you have shoe_size as a single attribute under “config_attributes” - what if you also want to bring in a second, or third attribute with a “simple” product, like, say color, and width? How would you construct that import csv?
Figured out the image problem last week. Thanks! Now I’m using the category importer on a new installation and the ->getRootCategoryId() function is not working. I double-checked to make sure a root category is assigned to the store, but it still always returns a value of 0, making the import skip adding categories. Any idea why this might be?
Also - there is a slight bug where it truncates “s” from category names. I think I remember the line in _addCategories(). Why have you set it up to do this?
Thanks again for such a great importer!
PS - are there any plans to expand this thing to be able to automatically add attributes and attribute sets? That would really give this tool wings!
pdxwebhead: I think every attribute generate a new ‘simple’ line that is linked in the ‘configurable’ line… I will try your solution, and try to merge the two import files too.
yecine06: Do you need to uncheck these attributes in catalog - attributes - manage attributes & manage attributes set, to make these items “unrequired”. Or… add these fields to your csv.
taylors: Do you copy the correct .php file to the correct folder, etc etc? What is the version number of that instalattion? I don’t like to edit too much magento code lines, because when you update these installation lost all the changes :( (the solution is to merge it) We go to make a new installation now to revise your question.
1/ Access via ssh to your magento folder (ssh root@your_server_ip)
2/ Go to magneto folder (cd /var/www/magento)
3/ Create some log folder (mkdir -m 777 var/log)
4/ Create the script php file (type “cat > cron_import.php”, intro, paste the code, CTRL-D)
5/ You can add this to your crontab, but you need to be a privilege user in your system (cp /etc/crontab /etc/crontab.bak && echo “00 0 * * * root /usr/bin/php -f /var/www/magento/cron_import.php” >> /etc/crontab)
Note that my profileId is 7, my php executable are in /usr/bin (you can localize yours by typing “locate bin/php")
Now, only rest to upload the name_of_my_impor_file.csv file to /var/www/magento/var/import via remote sync (rsync), ftp, shell script, cobian backup or similar… (perhaps at 23.00 hours, every day, 1 hour before cron job) Ah, and the images to /var/www/magento/media/import, in a similar way.