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 1 of 2
Automatic Images
 
sdb
Sr. Member
 
Avatar
Total Posts:  223
Joined:  2007-11-13
coastal California, USA
 

I would like it very much if I could just batch upload some images, and then have the products automatically pick which image to use based on the name

For example:
If I name an image bSKUcolor then it would be the base image for the sku of that number and that color. If I name it tSKUcolor then it would automatically be the image for the thumbnail, and sSKUcolor for the standard.

That would be so much quicker than having to, 1 by 1, tell which item to use which image, and upload the images all individually.

Can anyone think of a way to do this?
I can figure out how to batch upload the images, but not how to tell Magento to automatically use them.

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 

If I understand you its very doable in spreadsheet to csv import.  There is a field for each picture in the spread sheet as well as the sku, descritpiont etc etc, and you tell it which image name to use for the 3 different ones, and upload them all to /media/import.  If I am missing the point, sorry.  Uploading individually via the add new product page is very time cosnuming and no way to do it unless you only have a few products. Dataflow is the only way really.  Look into dataflow, it works great once you understand a few quirks about it.  If I am out in left field withyour question, well not the first time!  grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdb
Sr. Member
 
Avatar
Total Posts:  223
Joined:  2007-11-13
coastal California, USA
 

I wonder if anyone could point me in the direction of some reference material about or help me out with the CSV imports and dataflow. I didn’t find anything via a forum or wiki search.

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 

Hi, sory I did’t get back to your pm. I don’t know that there is much formal docs on it, but its easy to figure out. Just create some products in admin, then create a export profile and export them to a csv.  Open that csv ina spreadsheeet and you can see all the headers, al lthe info that is needed for a product.  Once you have that info, its easy to modify it, just leave the headers alone, and enter your new data.

NOTE all images that are imported via csv MUST be put in the /media/import folder, adn on the spreadsheet merely notated with a slas and the name, hence
/picture.jpg

try it with just one proudict, save the spreadsheet as a csv and use an import profile to import it and make sure it works. If it does, you are good to go.  Following those guidelines works.

Another caveat is the very first column, when exporting it tends to put admin there, that is wrong and all those must be changd to default.  that and the /picuter.jpg and uploading them all to /media/import and its pretty easy.

Try it with just one product, walk before you run.  Export, see the format, then save that export as a master file and use the origianl and delete everything but one product and overwrite the info with your new product, then upload it to /var/export and import it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdb
Sr. Member
 
Avatar
Total Posts:  223
Joined:  2007-11-13
coastal California, USA
 

when i try to do an export, for some reason the export tries to go in a wrong directory outside of the magento root. how would i change that?
(error: unable to create directory /home)

Warningis_dir() [function.is-dir]open_basedir restriction in effectFile(/home) is not within the allowed path(s): (/home/stra2com/:/tmp:/var/www/:/usr/local/lib/php/:/etc/virtual/) in /home/stra2com/domains/straightdown2.com/public_html/shop/lib/Varien/Io/File.php on line 443
 
Magento Community Magento Community
Magento Community
Magento Community
 
Vinos y Cosas
Member
 
Total Posts:  36
Joined:  2008-03-31
Madrid (Spain)
 

Hi AnnaM:
I ws reading your post but i realy dont understand it.
I created some product with the images but i dont see them in the frontend, i see all but not images, will you please explain to me in a easy way how to do it? Im not a programer so i need a slow explanation and details.
I will thanks you a lot if you can help me with this problem Anna.
Thanks again and sorry for my English

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 
sdb - 06 May 2008 06:50 AM

when i try to do an export, for some reason the export tries to go in a wrong directory outside of the magento root. how would i change that?
(error: unable to create directory /home)

Warningis_dir() [function.is-dir]open_basedir restriction in effectFile(/home) is not within the allowed path(s): (/home/stra2com/:/tmp:/var/www/:/usr/local/lib/php/:/etc/virtual/) in /home/stra2com/domains/straightdown2.com/public_html/shop/lib/Varien/Io/File.php on line 443

create a subfolder in /var called export then in your profile setup where it says path put
var/export

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 
Vinos y Cosas - 06 May 2008 07:04 AM

Hi AnnaM:
I ws reading your post but i realy dont understand it.
I created some product with the images but i dont see them in the frontend, i see all but not images, will you please explain to me in a easy way how to do it? Im not a programer so i need a slow explanation and details.
I will thanks you a lot if you can help me with this problem Anna.
Thanks again and sorry for my English

well if you mean via import, the most likely reason is that all products that are imported must have images uploaded to the folder
/media/import and in your spreadsheet you just put a slash and the image name for all 3 images
/pic1.jpg /pic2.jpg /pic3.jpg

If you are seeing the descritpins etc but not the pics, then thats why if its import.  If this is happening in prods created in admin, its hard to guess, other than make sure you are clicking Images on the left during product creation, then click browse and point it to the image on your pc, then upload it, AND tick each little circle to the right of the thumb that gets uploaded.

I upload one image 275x275 and tick all 3 boxes. If its square, magento resizes them fine with no distortion.  If you want a different size pic, then you will have to upload each, and tick ONE box next to it, base, small or thumb.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vinos y Cosas
Member
 
Total Posts:  36
Joined:  2008-03-31
Madrid (Spain)
 

Thank Anna, when i created a new product, i do as must be, in admin, general, price, image here i do as you say, take the image fron my pc and upload, browse and see the image but dont see it in the frontend.
I was looking in media> catalog> product, there are a few files like a, c, d, f, m, p and cache file, in the a, c, d, etc files i see the pics.
What im making wrone?
The import way you say, i realu don understand.
Thanks Anna

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 

Vinos, are you ticking the little circles next to the image?
and also the classic error is store view, at the very top of the left panel there should be the store view. Though if the verbage is showing its hard to figure why the images are not, unless you are not ticking the little circles.  whats your url?  if you prefer to pm it to me thats fine

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vinos y Cosas
Member
 
Total Posts:  36
Joined:  2008-03-31
Madrid (Spain)
 

Hi again Anna and thanks, yes im ticking the circles nex to the image, the store view you say? where i find it? in categorys i dont have because for the moment i just have 1 store.
The magento i instal in my pc for the moment and the url i think is http://127.0.0.1/rincon-gourmet/index.php/admin/catalog_category/ is what to means?
hope you can help me because I am remaining bald.
thenks

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 

Looks like you are working on this on your pc, and do not have a domain.  that is local host you are giving in the url.  Or something like that, in any event, I cannot see that, its not a facing domain.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vinos y Cosas
Member
 
Total Posts:  36
Joined:  2008-03-31
Madrid (Spain)
 

I am thankful for your time but the truth I do not understand what you say. thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdb
Sr. Member
 
Avatar
Total Posts:  223
Joined:  2007-11-13
coastal California, USA
 

i made the export directory, but what the error says at the end is

Unable to create directory '/home'Access forbidden.
so i don’t think it is the /var/export that is causing the problem

any other suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  325
Joined:  2008-01-29
San Francisco
 

Can you post a screen print of your profile setup?  sounds like you are tyring to give it the ful absolute path, which would probably include /home, and it certainly cannot create a folder that already exists and its probably owned by somebody other than you so you could not make any changes to it.  All you are supposed to put in the path is var/export nothing else. Exactly like there, no leading slash, just var/export Here I will post one of mine, this is what it hould look like for csv export.  Only for filename put in whatever you want.

edit: I notice thats an import, but its same for export, you just select Export in that box

Image Attachments
Untitled-1.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Vinos y Cosas
Member
 
Total Posts:  36
Joined:  2008-03-31
Madrid (Spain)
 

Profile InformationProfile InformationName: * Entity type:  Products Customers Direction:  Import Export Store:
Default (Admin) Values Default Store View
(Products will be added/updated to this store if ‘store’ column is blank or missing in the import file.) File InformationFile InformationData transfer:  Interactive Local/Remote Server Type:  Local Server Remote FTP File name:  Path:

(Absolute path or Relative to Magento install root, ex. var/export) FTP Host[:Port] User name Password Passive mode No Yes Data FormatData FormatType:  MS Excel XML CSV / Tab separated Spreadsheet Name:

(Leave empty for first spreadsheet)
Value Delimiter:  (\t for tab) Enclose Values In:  Original Magento attribute names in first row:
No Yes

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