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

Multiple Image Import Theory
 
hyperbuzzy
Jr. Member
 
Total Posts:  7
Joined:  2008-04-15
 

I’ve got products importing with associated images placed in the /var/import folder.

I’d like to attempt modifying the code that adds the record for the image to the catalog_product_entity_media_gallery table.

It would seem that if we added a for loop using a regular expression after the given filename in the csv then we should be able to add another record for that file, thus adding multiple images at import.

For example:

csv field for image is set to pic.jpg

regular expression looks for any images named pic_x.jpg

If found then another record is written for the second and subsequent matches to the catalog_product_entity_media_gallery table.

So, where in the code base is the function called (for checking the import folder for the image, moving it to the catalog folder and adding the record) when doing the import?

 
Magento Community Magento Community
Magento Community
Magento Community
 
bsboard
Jr. Member
 
Total Posts:  15
Joined:  2008-03-18
 

Im just hear to drum up support for the cause. I am wanting multiple image uploading also. Your idea seems like it would work. I’ll dig around and see what I can find in the codebase, but I’m still not familiar with this platform at all. If anyone could lend a hand it would be much appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rrobinson
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-05-19
Portland, Or
 

I would start here, this sets the path to the new image on import:

The code in app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php
~line 559

I’m thinking that since the import field is set to one of the 3 stock images you could do something
like a comma delimited list of images with the last one being the one you actually want set to the base
image in the ‘image’ field, this should add all images setting them to base but the last one being considered
an update and setting the flag to it.

might work...might not, just a thought.

Interesting feature, wish I had more time to work on it but I’m in the middle of converting multiple databases to magento sites.
Maybe when I’m done…

 
Magento Community Magento Community
Magento Community
Magento Community
 
magnet0
Jr. Member
 
Total Posts:  29
Joined:  2007-10-23
Heraklion, Crete
 

Is there anything new? does anyone have tried anything ?

Thank you

Yiannis

 
Magento Community Magento Community
Magento Community
Magento Community
 
june23
Jr. Member
 
Total Posts:  30
Joined:  2008-04-18
 

hi,

I’m very interested too about uploading multiple images on import. I hope someone can make this thing happen.

 
Magento Community Magento Community
Magento Community
Magento Community
 
gypsydogg
Jr. Member
 
Total Posts:  22
Joined:  2008-05-17
 

Anybody have problems with the “more views” disapearing after the import.  I find if I manually add a product, even with only 1 image, more views shows up fine, if I import a product with only 1 image, more views disappears.  Any advice?

 
Magento Community Magento Community
Magento Community
Magento Community
 
june23
Jr. Member
 
Total Posts:  30
Joined:  2008-04-18
 

The solution is not really easy, you have to modify some codes to make the images appear on “More Views”. But somehow I have successfully done it with the help of our programmer. I’ll try to explain and post the codes after I get it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Darsh
Member
 
Total Posts:  71
Joined:  2008-06-21
 

any luck yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ben Marks
Moderator
 
Avatar
Total Posts:  452
Joined:  2008-10-09
Charleston, SC
 

There is an extension available, but it installs into core.  it is easy enough to move it outside of core and add the necessary rewrites into your custom module.

http://www.magentocommerce.com/extension/474

 
Magento Community Magento Community
Magento Community
Magento Community
 
Prattski
Member
 
Total Posts:  54
Joined:  2008-01-22
 

I have written (and just re-wrote) a blog article that is a tutorial on how to build a proper module to import multiple images.  I hope this might help:

http://prattski.com/2011/07/15/magento-revised-multiple-image-import-module-1-5/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top