I am using Magmi to import products into Magento.
I upload all images to local folder (media/import) where files are either .jpg or .gif.
Images are named:
[sku.jpg] OR [sku.gif]
I have now configured Magmi so it imports all jpg images and this works fine.
This is how my CSV looks (only image columns):
image,small_image,thumbnail
sku,sku,sku
I am then using "value replacer" plugin to insert .jpg behind every sku in image columns. This also works fine.
Is it possible to also search for .gif in same import, so it either finds a sku with file extension .jpg or .gif ?
This is untested, but I'm sure you'd be able to do something like this:
+{{ (file_exists({item.sku} . '.gif') ? {item.sku} . '.gif' : {item.sku} . '.jpg') }}
I don't know the full location of the images, so it might need tweaking a bit, but the idea behind it should be correct.
Related
I am using admin csv import feature
In my csv file I have base, small and thumbnail image columns
When I do an import, all image come in fine and can be seen as expected
However, when I do a subsequent import, if the image columns are in that csv doc then I am seeing multiple images in the PDP page
Is there a way to prevent this other than not having the columns in the import file, obviously
No, this is not possible. For that you need to do custom code.
I am having an issue in Magento where my pictures are not being uploaded even though rest of the fields gets properly imported.
I don't know what's the path that I should specify for my pictures in order to get uploaded.
In my feed file I have something like this: /test.png or just test.png and I have tried to copy the image to the \var, \var\import, \var\importexport
Assuming you're using the default CSV-Import try to put them in media/import.
I've Googled, and Stackoverflowed this to death (and checked the Wiki), but I can't find a solution to my problem :(
Problem:
With Magento Magmi: all products and single images are importing fine, the only catch is that Magmi throws the following error when I try to import multiple images (e.g. /BJ977L.png,/BJ977R.png):
Image attributes processor v1.0.25 - /BJ977L.png,/BJ977R.png cannot be found in images path
Obviously I checked and the files are there... Also, if I change it to only reference one image, then it works. I find this very confusing.
The images are located in: media/import and the Magmi Image Plugin configuration reflects this. Also, if I move the images to another folder, say var/import/images; then it makes no difference...
Your help is hugely appreciated!
Thanks in advance!
As the Images Attribute Processor documentation states, you should be using a semi-colon ; to separate multiple images.
/extraimg1.jpg;/extraimg2.jpg
Also ensure that the column names you are using are correct. media_gallery is the correct column header name for the media gallery images.
Have you tried using semi colon?
/BJ977L.png;/BJ977R.png
Have you tried using the complete file path to the images? Also, did you specify the file path root for the images in the plugin settings?
If you have formatted the .csv file the right way then you should check the Image Renaming setting for the Image attributes processor. If you specify a bad rule to rename your newly imported images you could end up with the same name for every picture. So basically the first image will be imported, then the second will overwrite it because it was given the same name. If you only see the last picture you specified for the media_gallery attribute then this is probably the cause.
Hope this helps.
I'm using the datapump API - it works fine with my products, but now with updating images it won't work.
This is my array that Magmi doesn't like
array(5) {
["type"]=>
string(6) "simple"
["sku"]=>
string(6) "131017"
["image"]=>
string(76) "/ext/vhosts/site/subdomains/m/public/importer/../import/NO/A_131017.jpg"
["small_image"]=>
string(76) "/ext/vhosts/site/subdomains/m/public/importer/../import/NO/A_131017.jpg"
["thumbnail"]=>
string(76) "/ext/vhosts/site/subdomains/m/public/importer/../import/NO/A_131017.jpg"
}
When I imported my products, this worked fine, but there were descriptions etc. on
I have the following magmi settings:
using mode - Update existing items only,skip new ones
Image import mode - override existing images
Pre-download check for remote images - enabled
Assign only existing images - no
It seems like its a prerequisite of Magento import (and hence Magmi) that the images should be placed inside the media/import folder. So, regardless of where you run Magmi GUI from, the images should be placed inside the media/import folder. Moreover, if your images lie inside a folder inside media/import, you have to specify that in the import csv as well.
For example your images lie inside manufacturer-A folder, then you would have to also define on the image columns, the relevant folder path i.e. manufacturer-A/imagefilename.jpg
Plus, please be aware that it is a bad idea to have images named as 1.jpg, 2.jpg. Magento tries to create the subfolders for cacheing purposes using the first two letters in the filename. So a 1.jpg would ideally be placed inside 1/./1.jpg which is not possible because of the dot.
Note that when you define path for the images, it is not needed to define a full path just the relative path from the import folder (media/import) so in the example above, it is
manufacturer-A/image-1.jpg
and not
/ext/vhosts/site/subdomains/m/sitename/magento/media/import/manufacturer-A/image-1.jpg
Hope this helps. :-)
These are the steps i followed :
I created a category and added product to it in the backend of
magento
System->Import/Export-> "export" the csv file .
Removed the current values of the product already added then added
values new values to it.
Copied that csv file to media/import directory where images to be
uploaded were also present. (value = /image001.Jpg)
Went on to import and it says import successfully.
Output :
Products with the data uploaded successfully
BUT
No relevant images found, while i can see images uploaded in media/catalog/product..... folder
I have visited many many blogs forums, spent alot of hours for it but in vain. So in last i am posting it over here.
I would greatly appreciate if someone can post in the whole process in steps with sample Csv file and also tell us required fields and values for fields ib brief.
In my experience you have to make sure you put the image information in all the right places in the import CSV file. The three sets of image columns (image, image_label; small_image, small_image_label; thumbnail, thumbnail_label) are what set which image will be used for what purpose. And, they are one image per product.
However, it is the media images columns (_media_attribute, _media_image, _media_lable (yep, misspelled in Magento), _media_position, and _media_is_disabled) that actually define the image(s) for the product. These media image columns have to be completed on a one row per image basis. The _media_attribute is the id of that attribute (77 in my experience). The _media_image is that actual name of the image file in your media/import directory (case sensitive). The _media_lable is the title you want on the image. _media_position is the relative order of the images for this product. _media_is_disabled is the flag for each image that identifies whether the image is shown in the product media group or not.
I try this also pcproffitt: https://stackoverflow.com/users/1202982/pcproffitt
I have noticed that in my .csv file the columns were only (image, image_label; small_image, small_image_label; thumbnail, thumbnail_label) - that was from my Magento1.3 export but when I try to import it there is no error in importing but the Images were not seen on the site.
Then I found your Answer that in new version of Magento1.6 the column name is defferent it is (_media_attribute, _media_image, _media_lable (yep, misspelled in Magento), _media_position, and _media_is_disabled)
Whoops! I'm badly solving this. What would your suggestion though since I have 7000 plus products and images on my old site to transfer :( Is there a way to make this things gonna work out?
Thank you Sir!