Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento Import CSV / Image Does not exist! 
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-04-01
Los Angeles, CA
 

Magento makes it too difficult to import images and gallery.

Testing version 1.7.

There’s a ‘gallery’ and a ‘media_gallery’ in the database.

I was able to import ‘thumbnail’, ‘small_image’, and ‘image’ fine.  They show up in the frontend.  However, in the backend, it doesn’t show up because the managing products reads the images from the media_gallery.

Making any changes to the product in the admin backend will remove ‘thumbnail’, ‘small_image’, and ‘image’ because there is no media_gallery image.

Might have to bring back “product_gallery_importer”.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mathywow
Jr. Member
 
Total Posts:  2
Joined:  2011-03-23
 

Managed to make a simple hack that allows you to add multiple images with the Data Flow import. If there’s any better way I couldn’t find it.

The end result is having to add a column ‘media_gallery’ in the .csv file, where you would write all the files you want added for the product in the following format : ‘/image1.jpg, /image2.jpg’, etc.
These images go like the rest in the /media/import folder.

This .cvs file you would then proceed to upload and run with the standard DataFlow Products Import profile. I should also say that I have only tested this on Magento 1.7, and that it’s recommended to create a module that overrides the core file and not hack it.

Now, what you need to do is open the file
app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php
and go to around line 773 and find

$addedFilesCorrespondence $mediaGalleryBackendModel->addImagesWithDifferentMediaAttributes(
            
$product,
            
$arrayToMassAddMage::getBaseDir('media') . DS 'import',
            
false,
            
false
        
);
and paste the following code right after it
if (isset($importData['media_gallery']) && !empty($importData['media_gallery'])) {
            $x 
explode(','$importData['media_gallery']);
            foreach (
$x as $file{
                $imagesToAdd[] 
= array('file' => trim($file));
            
}

            $mediaGalleryBackendModel
->addImagesWithDifferentMediaAttributes(
                
$product,
                
$imagesToAddMage::getBaseDir('media') . DS 'import',
                
false,
                
false
            
);
        
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
arthurjedr
Jr. Member
 
Total Posts:  4
Joined:  2012-01-19
 

Same exact problem here, cant even use any of the offered solutions. What seems to be happening is that Magento 1.6 does not import an item if you don’t have the corresponding image. Out of 3000 items it imported maybe 1000. Magento 1.4 imported items just fine even without images. What gives? I did notice however that despite partially importing CSV, when I imported the same file AGAIN, it would still not process the whole file BUT, it added more items that weren’t previously imported. Somehow this “Image Does Not Exist” error has an impact on my imports.

And I cant just throw images into a media/import/s/k directory because Sku numbers for Art Supplies are ALL over the place, nothing uniform or standard. i.e 51135208373, 21200531095, 74711717403.

Following some of the solutions, I would have to create a directory for every possible number, import images separately to those directories and then run the CSV? Seems like a step back for Magento, and completely out of the question.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mathywow
Jr. Member
 
Total Posts:  2
Joined:  2011-03-23
 

I was having the Image does not exist error too and it turned out it was because the csv wasn’t UTF-8 encoded.

You should try to convert your csv to UTF-8.
I did that with Notepad++. Just be careful when changing the encoding it might also screw up some of your special characters. I usually copy the whole text, change encoding then past it back (other editors might be better at changing the encoding).

Good luck !

 
Magento Community Magento Community
Magento Community
Magento Community
 
caitlinhavener
Jr. Member
 
Total Posts:  19
Joined:  2012-05-21
 

Working on 1.7 as well. Did the above hack work for any of you? Does anyone know if I upload the products with Store Manager for Magento trial will they still be there when the trial ends? Was hoping to import these products this weekend! Any advice appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
inicioLaura
Jr. Member
 
Total Posts:  3
Joined:  2012-04-19
 

Thank you so much.

It is all right to magento 1.6.1.0

mathywow - 22 May 2012 06:07 AM

Managed to make a simple hack that allows you to add multiple images with the Data Flow import. If there’s any better way I couldn’t find it.

The end result is having to add a column ‘media_gallery’ in the .csv file, where you would write all the files you want added for the product in the following format : ‘/image1.jpg, /image2.jpg’, etc.
These images go like the rest in the /media/import folder.

This .cvs file you would then proceed to upload and run with the standard DataFlow Products Import profile. I should also say that I have only tested this on Magento 1.7, and that it’s recommended to create a module that overrides the core file and not hack it.

Now, what you need to do is open the file
app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php
and go to around line 773 and find

$addedFilesCorrespondence $mediaGalleryBackendModel->addImagesWithDifferentMediaAttributes(
            
$product,
            
$arrayToMassAddMage::getBaseDir('media') . DS 'import',
            
false,
            
false
        
);
and paste the following code right after it
if (isset($importData['media_gallery']) && !empty($importData['media_gallery'])) {
            $x 
explode(','$importData['media_gallery']);
            foreach (
$x as $file{
                $imagesToAdd[] 
= array('file' => trim($file));
            
}

            $mediaGalleryBackendModel
->addImagesWithDifferentMediaAttributes(
                
$product,
                
$imagesToAddMage::getBaseDir('media') . DS 'import',
                
false,
                
false
            
);
        
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
hennen21
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2012-03-06
 

Working with CE 1.7.0.2 and no solution works for me.

Importing of a CSV file, no problem.
But a CSV file with images? NO WAY.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hennen21
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2012-03-06
 

I have made 2 new products in CE 1.7.0.2

Export them to Excel (version 2012).

Save the exportfile as .cvs without any editing.

Import that cvs file SYSTEM > IMPORT/EXPORT > DATAFLOW - PROFILES

Big surprise: the file can’t be handled, no valid value for “type” ?????????

Image Attachments
4-8-2012 17-32-49.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
MakedonX
Jr. Member
 
Avatar
Total Posts:  25
Joined:  2012-03-12
 

If anybody wants lowest quote for importing Magento products (from .csv file) with image feel free to contact me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fragrances
Member
 
Total Posts:  37
Joined:  2010-08-27
 
MakedonX - 06 August 2012 01:01 PM

If anybody wants lowest quote for importing Magento products (from .csv file) with image feel free to contact me.

We shouldn’t have to pay $500 to export gallery images. It is ridiculous! Should be a standard export function!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt80
Jr. Member
 
Total Posts:  3
Joined:  2012-08-22
 

Personally, I think it will be better to make a module that imports everything in a few minutes. I don’t think that it is very difficult.
The only thing that helped me with import was this service.  www.file2cart.com
At least it is faster than other services and modules.

 
Magento Community Magento Community
Magento Community
Magento Community
 
snyper186
Jr. Member
 
Total Posts:  1
Joined:  2012-08-29
 

Hi!
I am having the same issue. Was wondering if you found a fix? I am using Magento 1.7 and cannot upload product images at all.

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
MakedonX
Jr. Member
 
Avatar
Total Posts:  25
Joined:  2012-03-12
 
fragrances - 22 August 2012 03:51 PM

MakedonX - 06 August 2012 01:01 PM
If anybody wants lowest quote for importing Magento products (from .csv file) with image feel free to contact me.

We shouldn’t have to pay $500 to export gallery images. It is ridiculous! Should be a standard export function!!

I do it for $30, for $500 psd to magento + importing products with images as free service

 
Magento Community Magento Community
Magento Community
Magento Community
 
JC77
Jr. Member
 
Total Posts:  16
Joined:  2012-02-17
 

After I created an ‘import’ folder within the Magento media folder and moved all of the image folders and subfolders to it, I still get the “image does not exist” errors, however, upon going to the backend product pages, the product data was successfully imported and the images are there, but they are not “active” (i.e. on the back-end product pages, the radio buttons in the columns for the three image sizes are not ticked for any of the products (despite the fact that in the csv, image references were included in all three columns).

When I manually check the radio buttons to set the images as active, the images appear on the front end. Does anyone know what might be causing the images not to be marked as active when the associated products are uploaded? I’m using CE 1.7, Dataflow with a csv file imported from Google Spreadsheet to ensure it’s UTF-8 compatible.

 
Magento Community Magento Community
Magento Community
Magento Community
 
torontob
Jr. Member
 
Total Posts:  8
Joined:  2012-10-01
 

mathywow - The following instructions from you works just fine on version 1.7x - This snippet of the code should be submitted to become part of the trunk code. Thanks

mathywow - 22 May 2012 06:07 AM

Managed to make a simple hack that allows you to add multiple images with the Data Flow import. If there’s any better way I couldn’t find it.

The end result is having to add a column ‘media_gallery’ in the .csv file, where you would write all the files you want added for the product in the following format : ‘/image1.jpg, /image2.jpg’, etc.
These images go like the rest in the /media/import folder.

This .cvs file you would then proceed to upload and run with the standard DataFlow Products Import profile. I should also say that I have only tested this on Magento 1.7, and that it’s recommended to create a module that overrides the core file and not hack it.

Now, what you need to do is open the file
app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php
and go to around line 773 and find

$addedFilesCorrespondence $mediaGalleryBackendModel->addImagesWithDifferentMediaAttributes(
            
$product,
            
$arrayToMassAddMage::getBaseDir('media') . DS 'import',
            
false,
            
false
        
);
and paste the following code right after it
if (isset($importData['media_gallery']) && !empty($importData['media_gallery'])) {
            $x 
explode(','$importData['media_gallery']);
            foreach (
$x as $file{
                $imagesToAdd[] 
= array('file' => trim($file));
            
}

            $mediaGalleryBackendModel
->addImagesWithDifferentMediaAttributes(
                
$product,
                
$imagesToAddMage::getBaseDir('media') . DS 'import',
                
false,
                
false
            
);
        
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top