Pergunta

Importing gallery images seems like such a fundamental function, but I cannot find any column in my csv exported file where I would do this. I created a single product with gallery images through magento's backend and then exported into csv and even those gallery images are nowhere to be found in the csv file.

what am I missing?

Foi útil?

Solução

Just to clarify, I assume you are using the Import/Export module, NOT Dataflow. If you have been using Dataflow please try the same process with Import/Export module and see if your results improve.

This is definitely standard functionality - please see my linked CSV export from a fresh install of Magento CE 1.7.0.2 with sample data installed. Do a search for small_image and you'll find the correct columns:

image_label, small_image, small_image_label, thumbnail, thumbnail_label

There are also these columns for controlling the media gallery:

media_gallery, _media_attribute_id, _media_image, _media_lable, _media_position, _media_is_disabled

The Magento import/export is tricky, there's no two ways about it. There's basically no documentation and some quirks/bugs that can cause unexpected results. Everyone who knows how to use Mage_ImportExport has most likely spent hours crying into their keyboards at some stage.

That being said, it does work and it does work well once you know the tricks. If you could post your CSV here and maybe tell us if you've made any customisations to your Magento installation then the community will be able to better assist you.

Also, make sure you are not ticking any of the attribute 'skip' checkboxes when you are performing your export.

Outras dicas

Just add the following columns to your import CSV

image_label, small_image, small_image_label, thumbnail, thumbnail_label

And set the respective image paths to be relative to ./media/import . Eg

image_label, small_image,
"my_label",  "./img.jpg",

Then upload all your images to be in ./media/import

Categorising imports

If you want to categorise the images, just put them in a sub-directory in ./media/import - and set your path in the CSV to include it.

Eg. You uploaded your images to ./media/import/20130304
So the image path would be ./20130304/img.jpg

I took me forever to figure this out so I decided to chime in and possibly provide some help.

• The answer from soft Prodigy is a $99 "fix" to using magmi. • jharrison.au is the correct one and after much working on it I got it to work.

First export and import as he stated has to be done NOT using dataflow. Data flow won't work. From there i had a problem trying to figure out which attributes were needed.

Here is what I did: 1. Set these fields to the following: _media_attribute_id: mine is 80. You can find yours by going to Catalog > Attributes > Manage Attributes > Media Gallery in the URL you'll see the attribute. _media_image I set like this /filename.jpg >>>>>> this has to be in the media > import folder of Magento /filename2.jpg >>>>>> this has to be in the media > import folder of Magento

  1. After you import your product you have to Reindex, this had me frustrated for a while! Go to System > Index management > and Reindex Data

I hope this helps anyone. Sorry if it seems repetitive from the previous posts.

Just a small clue (in addition to the very good answer of jharrison.au) which costs me about hours. It seems to me that the imagefiles have to be named in lowercase letters. Perhaps this information could help somebody.

I agree with great answer of jharrison.au. I would say even more, seems to be no consistency in how DataFlow and Import/Export module behave in different versions of Magento.

For those who are looking for a solution to update big databases (over 10k products) I advise to look into great free open source tool MAGMI. See explanation about the format here.

In short, it's like this:

media_gallery /image1.jpg;/image2.jpg

And you should place your images in "Media folder" directory (must be adjusted in MAGMI)

If you experience difficulties with setting up MAGMI (i know, it might be a bit tricky for non-pros), you can use this extension which is basically a MAGMI integrated into Magento backend for ease of use with some extended functionality. It allows to perform this task just out of box.

1.9 CE you will want to specify in your CSV the sku and gallery which can include a semi-colon ; delimited list with a prefixed forward slash that is relative to the /media/import directory for your files, e.g: /56789.jpg;/43345.jpg. You can also specify the image, small_image and thumbnail image among other fields if you wish, these are the ones I set as a minimum requirement.

Magento can import images to gallery.

Not exactly all the images should be in separate columns. Here is example.

If you upload let's say 5 images for 1 product, in your file you need to place image name with leading slash (/image_name.jpg) in _media_image column (each line for each image) e.g:

enter image description here This are images to one product with SKU If you import images just to gallery you will get them here -

enter image description here But as you can see, none of images are added as main product image.

In Magento main products image is called base and it is sown at product page, small image will be shown at category view and thumbnail (in related products etc)

So to make some or one of your images to be shown as small, base and thumbnail you need to have separate columns and there put image names too

So you can make one and the same image as small, base nad thumbnail or different images.

Let me know if found an issue.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top