1
votes

Our products were imported using Magmi and the swatch images set using the media_gallery field of the Magmi CSV file. After the import completes, the swatch images are seen correctly in the product catalog. When viewing the product in the public site of the site, the swatches are not show. When going back to see the product catalog, the swatch images have disappeared.

If we add the swatch images manually through the product catalog the swatch images remain as expected.

After the import is complete the product looks like this from the admin page:

enter image description here

Then going to the public view page we see this:

enter image description here

Going back to the product catalog page we see that the swatch images have been removed:

enter image description here

Example CSV:

sku,media_gallery
Configurable623,/variant/large/12288.jpg::Dog-swatch;/variant/large/12289.jpg::Monkey-swatch;/variant/large/12290.jpg::Owl-swatch;/variant/large/15355.jpg::Bee-swatch;/variant/large/12291.jpg::Ladybug-swatch

Refreshing or not refreshing Magento index has no affect either way. All caches are turned off.

Magmi image import settings are:

enter image description here

2
This bug report on the Magmi GitHub page looks promising - github.com/dweeves/magmi-git/issues/183. I tried commenting out "$eventWrapper->setProductIdsOverride($mediaProductIds);" in...../Observer.php as suggested and it prevents the images being deleted, but it's really just a work-around. I think the issue may be caused by the Configurable product swatch images referencing the same file as the Simple product images.Daniel Flippance
any idea how to fix i have same issue ?Ravi Patel

2 Answers

0
votes


I have faced the same issue when I have imported the products through CSV. The images are showing in front-end but not showing in back-end and when I save the product, the images are gone. I followed this link that helped me. Give it a try.
Thanks.

0
votes

I Faced same issue I resolved it following @Ali sadikin solution here is it Images disappear after import thru Magmi

the truth is,images were not deleted,but only filename removed from database because the default catalog module remove duplicate image

so,the problem solving is below

override module "Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media" into your own module step: in file media.php in

function loadGallery($product,$object){ 
//$this->_removeDuplicates($result); please comment this
}