Question

I am working on Magento EE 1.13 with two store views. Some products are sold in both store views. I want each store view to have a unique base image for the product. I am working with Import/Export->Import.

The "image", "small_image", and "thumbnail" product attributes all have "store view" scope.

After import, each store view shows the correct base image, but the product image for store #1 displays as a thumbnail in the media gallery for the product in store #2.

Below is the format for the csv file I am using to import. The product image paths are relative to media/import/.

sku,_store,image,small_image,thumbnail
1234,store1,/store1/1234-store1.jpg,/store1/1234-store1.jpg,/store1/1234-store1.jpg
,store2,/store2/1234-store2.jpg,/store2/1234-store2.jpg,/store2/1234-store2.jpg

What do I need to change in my import csv file to not have the other store's image appear when I view the product on the front end?

Was it helpful?

Solution

I ended up solving this problem by importing the images into BOTH store views as above, and then directly updating the database to "exclude" the necessary images from the relative store view.

I used a script that first selected an image from the table "catalog_product_entity_media_gallery" then looked at the post-fix I gave to the image names (they relate to the store view).

I then used that image's id to look in the "catalog_product_entity_media_gallery_value" table and set the "disabled" flag for the appropriate store view.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top