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

Page 2 of 4
Images not showing up after import
 
june23
Jr. Member
 
Total Posts:  30
Joined:  2008-04-18
 

anybody knows how images appear on “more views” on import?..has anyone successfully done it?..is this solve already on other threads that everyone ignores this question?..any answers will do that lightens up this problem..hope someone will notice this..

 
Magento Community Magento Community
Magento Community
Magento Community
 
magentomatt
Member
 
Total Posts:  37
Joined:  2008-08-08
 

Anna,

Are you using windows or Mac OS?

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

In app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php around line 628 (the bottom of the saveRow function) you should find this

foreach ($imageData as $file => $fields{
         
try {
             $product
->addImageToMediaGallery(Mage::getBaseDir('media') . DS 'import' $file$fields);
         
}
         
catch (Exception $e{}
The call to addImageToMediaGallery is not specifying all of the possible parameters, and the one for whether to exclude the image or not is defaulting to true.
To have it always enabled, change it to this
foreach ($imageData as $file => $fields{
         
try {
             $product
->addImageToMediaGallery(Mage::getBaseDir('media') . DS 'import' $file$fields,
             
false,         /* move the file or not, default is false */
             
false);         /* exclude or not, default is true */
         
}
            
catch (Exception $e{}
 
Magento Community Magento Community
Magento Community
Magento Community
 
gbarclay
Jr. Member
 
Total Posts:  1
Joined:  2008-11-09
 
joyously - 09 September 2008 06:20 PM

In app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php around line 628 (the bottom of the saveRow function) you should find this

foreach ($imageData as $file => $fields{
         
try {
             $product
->addImageToMediaGallery(Mage::getBaseDir('media') . DS 'import' $file$fields);
         
}
         
catch (Exception $e{}
The call to addImageToMediaGallery is not specifying all of the possible parameters, and the one for whether to exclude the image or not is defaulting to true.
To have it always enabled, change it to this
foreach ($imageData as $file => $fields{
         
try {
             $product
->addImageToMediaGallery(Mage::getBaseDir('media') . DS 'import' $file$fields,
             
false,         /* move the file or not, default is false */
             
false);         /* exclude or not, default is true */
         
}
            
catch (Exception $e{}

joyously you’re a champion!

Steps I took to get multiple image, spreadsheet based imports working.

1. Make changes to Product.php as per joyous’ instructions.
Note: Change the first ‘false’ to ‘true’, it’ll create the usual structured copies of the images in the media/catalog/product directory - you can then remove the originals after the import process.
2. Upload images to /media/import
3. Create a spreadsheet to import as usual
Note: For multiple images per product, create a duplicate line on your spreadsheet with identical information except for the location of the image.
Also: Prefix the image location with a forward slash ‘/’.

4. Import!

...I’ve never spent so long looking for a solution!

Much better than installing a package/extension or fiddling otherwise.

Thanks! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnieP
Jr. Member
 
Total Posts:  9
Joined:  2008-09-18
 

Thanks Anna!
I ran into this same problem, and your solution worked like a charm.

I do want to point out for those of you that have exported the images from one store and are attempting to import those same images to another:  You don’t need to go into the csv file to edit out all of the extraneous folder information created by magento during a regular product import (ex: removing /a/a/ from /a/a/image.png).  That would simply be too much for some people, and I try to make my life easier when possible.  wink

Here’s what I did:
1) Zip up the products folder located in /www/magento/media/catalog/product
2) Move the product.zip to /www/magento/media/import/
3) Unzip the product.zip folder
4) Move all of the subfolders (of the product folder) to /www/magento/media/import/
5) Go back to the admin, and import all of the products

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Sr. Member
 
Total Posts:  142
Joined:  2008-08-15
 

I’m having an odd problem. Some of my images are working, and some aren’t.

I upload all the products to the media\import folder.

Then I run the Import profile. Some of the product show and some don’t. I can find no reason why some work and some don’t. All images are jpg files. Non have funny characters.

Anyone else experiencing this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sousa
Guru
 
Avatar
Total Posts:  348
Joined:  2007-09-02
Porto, Portugal
 

No but i’m still not import images to online store.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikep
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2008-06-12
 

Hi All.... I’m also unable to upload my images via .csv

I have all my pics under /media/import ....... Permissions on these folders are set to 777 ...I also tried setting to 755. I am able to do manually but with 25k in product who’s up for that task????? Not Me..... I believe in a one import method.....smile . I have read through many threads and have found no answers.  I’m currently running 1.1.8 but I ran into this same issues with 1.1.7 . 

Any help would be greatly appriciated…

Magento Has a nicely knit community..

Regards,

Mike.....

NJ, USA

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sousa
Guru
 
Avatar
Total Posts:  348
Joined:  2007-09-02
Porto, Portugal
 

I send a PM to Roy but he don’t answer.

If anyone can make it work please post here the server specifications, OS and browser.

Maybe with this information we can solve the bug.

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
frostbytes
Sr. Member
 
Total Posts:  114
Joined:  2008-11-05
Edmonton, Alberta, Canada
 

For those of you who are having problems importing images via CSV, I had no trouble with that today.  Have a look at my post at the bottom of this thread.

[L]

 
Magento Community Magento Community
Magento Community
Magento Community
 
benfrain.com
Sr. Member
 
Total Posts:  142
Joined:  2008-08-15
 

My problem turned out to be permissions related. I had to make the media\import folder (and all sub-folders - but not files) ‘777’ through FTP.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kayakbabe
Jr. Member
 
Total Posts:  23
Joined:  2008-12-01
 

gbarclays code modification helped me with importing images. All my permissions were correct. But the code in the file he mentioned was set to false.. so the imports were never done.

Since I put all my images in my data to import as just the file name AND I placed them all in the media/import folder.
It doesn’t make sense to have to populate the data with a slash in front of all those product names.

so I further modified his line of code like this

$product->addImageToMediaGallery(Mage::getBaseDir(’media’) . DS . ‘import/’ . $file, $fields, true, false);

I think this is a better bug fix becuase now I can still use paths if I put images into say media/import/store1 and media/import/store2
I jsut do not put the preceeding slash in teh very front of my image paths in my data
so now in my import data the image paths would be like
imagename1.jpg
store1/imagename.jpg
moreimages/imagename.jpg
and so on.

hope that helps for those who jsut have all their images lumped into one folder. It sure helped me.

Thank you gbarclay for figuring out where the problem was.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sousa
Guru
 
Avatar
Total Posts:  348
Joined:  2007-09-02
Porto, Portugal
 

i found a bug, and the problem is on extension file.

I try to import a file with a .JPG extension and don’t work, then i try .jpg and work fine.

People, try that.

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
thE_iNviNciblE
Sr. Member
 
Avatar
Total Posts:  220
Joined:  2008-01-09
Oldenburg
 
Sousa - 17 February 2009 02:34 PM

i found a bug, and the problem is on extension file.

I try to import a file with a .JPG extension and don’t work, then i try .jpg and work fine.

People, try that.

Regards

this issue has been reported by me ...

Importing with Images -> .JPG will be skipped

is could be a quite confusing bug, especially for new people on magento… ok i think the most people have a .jpg extension but for someone who have a .JPG is quite difficult to understand why images seems to be broken....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sousa
Guru
 
Avatar
Total Posts:  348
Joined:  2007-09-02
Porto, Portugal
 

thE_iNviNciblE,

http://www.magentocommerce.com/bug-tracking/issue?issue=http://www.magentocommerce.com/bug-tracking/issue?issue=5211 on 2009-02-27 11:38:38

i already report that, but fine.

The most important is to solve the bug.

Regards

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 4