Which magento table contains product image names? - magento

The problem I'm having is that I import products with Magmi (magento product import open source solution), but I don't see the product image on the front end. I need to know which table in magento database contains image names so that I could maybe feed it somehow directly...

catalog_product_entity_varchar
The table above stores the values that will link your images, but you need check first with the eav_attribute table to find the correct attribute_id key that will reference the image. While this answers your question, I want to remind you that making database changes directly is strongly discouraged. Hope this makes sense.

catalog_product_entity_varchar references the attributes for base_image, small_image & thumbnail along with other attributes requiring an image.
To find all of the images associates with a product we found all of the images listed within catalog_product_entity_media_gallery. This helped us find all duplicate images uploaded
--
We have also used this post to find/fix missing images after a product uploads
http://www.blog.magepsycho.com/tag/catalog_product_entity_media_gallery/
But as already mentioned, use with caution!

catalog_product_entity_media_gallery_value_to_entity is what you'll have to use to reference which product ties to which image.

Related

How to import mangeto product gallery from magento dataflow profile?

I just tried to export all products from magento using magento import/export. i got all products with gallery url's in a .CSV file.
But when i tried to import that file in another magento store with same category structure, I got 'small', 'thumbnail' and 'base' images at admin but not able to see any gallery images which is in exported magento store.
How can i get all product gallery images?
Thanks in advance
To import the images also you need to copy them inside media/import folder keeping the rest of the path intact.
For example if you have in the exported file an image names '/i/m/image.jpg', you should copy that image to media/import/i/m/image.jpg of your other website.
Magento will take care of the rest (copying the image in the right folder and renaming it of necessary).
[EDIT]
For every image you need a new row in the import file. Near the end of the file there should be some columns called _media_attribute_id,_media_image,_media_lable,_media_position,_media_is_disabled. These should be filled with the correct values.
Let's take an example. Let's say you have 2 images for a product with SKU 123. The import file should look like this (I skipped the rest of the attributes):
sku,....,_media_attribute_id,_media_image,_media_lable,_media_position,_media_is_disabled
123,....,88,/i/m/image1.jpg,"Some label here",1,0
,....,88,/i/m/image2.jpg,"Some other label",2,0
As you can see there are 2 rows. One for each image. On the second row all the fields are empty except the ones I mentioned above. (The value for _media_attribute_id might be different).

Magento 1.7 product image import not assigning image to product

I have done a CSV import of my products, and using this walk-through I have uploaded my images for each product. My problem is that although the image is being recognised as the image for the right product, the product is not saving the image as the one to be displayed (see screenshot below). How do I use the CSV upload (I am using a dataflow profile) to import and set the product images?
(source: i.imm.io)
My CSV (for a single product) looks like:
sku,image,small_image,thumbnail
TT010,/TT010-350x200.jpg,/TT010-350x200.jpg,/TT010-350x200.jpg
I used this step and it works.
see the Id of 'media_gallery' in database->eav_attribute (in my version it is 703)
in the csv file, add this column: _media_image, _media_attribute_id, _media_position, _media_is_disabled
_media_image : same value as image or small_image
_media_attribute_id : is the Id that you've seen in step 1.
_media_position for first image is : 1
and set _media_is_disabled to 0
Use Import tool in admin!
It seems your problem occurring because of image positioning.
So Please Try this -
**sku, image, small_image, thumbnail, _media_image, _media_attribute_id, _media_position, _media_is_disabled
123, /Agent700.jpg, /Agent700.jpg, /Agent700.jpg, /Agent700.jpg, 88, 1, 0**
Make your CSV as per the above norms and change the column as per your requirement but do not change 88 which is _media_attribute_id. and keep 1,0 for _media_position & _media_is_disabled.
I have tried this and works perfectly.
Hope It'll helpful for you as well.
MAGMI is the best way to do this. Otherwise the importing of the products is always a head pain from my experience.
In MAGMI, in order to get multiple images imported as a media gallery, all you need is:
1) define field media_gallery in you CSV and populate it like this:
/image1.jpg;/image2.png/image3.jpeg
2) Install MAGMI plugin images attribute processor
3) Store your images in the folder that you defined as "media import" folder in MAGMI settings before importing
More details here:
http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Image_attributes_processor
Those who consider paid extensions for easy resolving this task, take a look at this one which fully integrates MAGMI into Magento and allows more handy features.
When viewing the products there is an option at the top left to view either default values or to view the values for the store. What I was viewing was the default values. When I changed this drop-down to the store values, then I saw that the images were being assigned.
(source: i.imm.io)

Magento product csv upload with images

I’m trying to upload the csv file with about 300 products in and I’m having a couple of issues with it.
1). I have put the images in media/catalog/product/images/ and the path I’m giving in csv is /images/image_name.jpg. Now when I import the csv I can see the products with image at frontend. But in admin panel, I can’t see any image against the products. I don’t know where I’m doing wrong to show these images in admin panel.
2). I have a couple of multi select attributes. CSV import is not working with multi select attributes (it just picks up the first one). Any solution for this?
You are placing your images to wrong folder and they should be in media/import instead with right permissions and case sensitive names.
Refer to http://blog.calientedesign.com/?p=56 or perform a web search for "magento image import"
As Jonathan said, you must put all of your images that you wish to import into media/import. The other crucial part of this is your CSV. Every image name must of course match properly, but it must have a forward slash in front of the image name. So, if you put 'image1.jpg' into media/import, then in your spreadsheet, the image columns should have '/image1.jpg'.

Exclude main image from Magento product gallery

I need to update my database of products to mark the "base" image of every product as Excluded. Some products have 1 image, some have more than 1. In each case one image is marked as being the Base, Small and Thumb image. In every case, where an image is marked as such, I need it to be excluded from the gallery.
Currently, without it being excluded, that image will show up twice in the lightbox gallery (Magento 1.4.0.1).
Does someone know the database structure well enough to give me a mySQL solution to update this?
I can manage future new products easily enough, but there's no way I'm running through 22000 products manually! :-)
Thanks in advance!
The SQL to do this in Magento 1.4.0.1 is:
UPDATE `catalog_product_entity_media_gallery_value`
SET Disabled = 1
WHERE Position = 1
I agree that updating the gallery code would have been a good/better solution, but in my case I am easily able to keep on top of this as new products are added in future.
It is easier to update your gallery code to exclude the first image you also do not have an ongoing need to update the product images.

Magento: Prevent products without images from showing

We've just done a mass import. We have allot of products showing up without images and we need to prevent that. There not supposed to have images or show but we can't set them to "Not visible anywhere" in the CSV.
So if images = 0 don't show anywhere.
Any help is greatly appreciated. Thanks in advance.
You can modify the category collection so that it only loads Products that have images. If you use flat tables (recommended), it should not be very difficult to add a filter method to the collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection.
A more dirty but easier way would be to just not display the products without images in the product listing template (app/design/frontend/templates/catalog/product/list.phtml). The image helper is used there to display the product images. Whenever the default image is about to be shown, you could continue to the next product. But remember, that the products without images are loaded anyway, which is really dirty.
Try putting "Not Visible Individually" in the "Visibility" column of your CSV whenever the "image" column is empty.

Resources