Wow, this is quite the ongoing subject. I have found quite a few different threads about this and they seem to have conflicting information. A lot seems like it has changed since the first post. Trying to restructure all of these posts and filter out the ones that donât apply anymore can be difficult. Let me see if I can sum up what has already been said and maybe someone can fill in the gaps.
From what I have been reading originally, in order to import multiple images into Magento with your products required some various php code changes, profile creations, and other hacks.
Then @hyteckit create an extension and instructions to do this a lot easier. This worked for awhile.
Until Magento 1.1.7 came out with the gallery column during an import being supported by default. Now this extension looks like it either doesnât load or breaks Magento Admin when you load it. So this is no longer an option.
From my understanding of these posts, now with Magento 1.2.x and 1.3.x the ability to import multiple images for each product is built into the system.
1. Upload your images to /media/import and then you can put them in folders under that if you want.
2. Create some products in your store.
3. Go into Systemï Import/Exportï Profiles and export all of those item
4. Download the export file located at /var/export/export_all_products.csv to your computer.
5. Edit the CSV file (not using excel because it changes it too much). Change the rows to the information that you need to import
6. The image, small_image, thumbnail columns you put in the image names that you want for these preceeded with a forward slash plus any directories to match where you put those files in the /media/import directory. For example, if your file is located in /media/import/image1.jpg you would put /image1.jpg in those columns if that is the file you want for those. If you image1.jpg is located in /media/import/800/image1.jpg you would put /800/image1.jpg in those columns.
7. Next, create a âgalleryâ column.
8. In the gallery column list all the photos that need to be associated with that product. You list them like this: /image1.jpg;/image2.jpg;/image3.jpg. Or if you have them in /media/import/800 folder you would list them as: /800/image1.jpg;/800/image2.jpg;/800/image3.jpg
9. Then you save your csv file.
10. Open it in notepad and resave it in ANSI or UTF-8 or Unicode. I am not sure on this part. I have noticed different answers for this.
11. Name it exported_products.csv
12. Then copy it up to /var/import folder on the Magento server.
13. Go into Systemï Import/Exportï Profiles and select the import all products profile.
14. Edit the profile so that it will be looking in the /var/import folder for the exported_products.csv file if you need to.
15. Then run the profile. It should import your files.
After I did this I noticed two things.
1. When it imported the products it only imported the image that I had set as the image, small_image, and thumbnail. It did not import any more images into that product that I had put in the gallery column. So it is like it isnât working.
2. It excluded all of the images. However, this fix has been mentioned above. I followed these instructions and it fixed that @eric1285 posted:
I got around this by making a quick hack in in the Product.php file under app/code/core/Mage/Catalog/Model/Convert/Adapter.
I changed this:
$product->addImageToMediaGallery(Mage::getBaseDir('media') . DS . 'import' . $file, $fields);
In version 1.2.1 itâs line 463.
$product->addImageToMediaGallery(Mage::getBaseDir('media') . DS . 'import' . $file, $fields, false, false);
So what Iâve accomplished is that I can import products no problem. It will import one picture for each of them and leave the exclude off. However, anything that I put in the âgalleryâ column in the csv file seems to be ignored. The files are in the /media/import folder so I donât understand why it wont import them. Some of the posts mention that you need to make some code changes to some PHP files still, but it seemed like these changes were versions prior to 220.127.116.11. That is the version I am on. Do we still need to make those changes in the PHP files? Or is there something else that I am missing.
Thank you so much for your assistance with this.