0

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

1
  • 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. Commented May 21, 2015 at 19:00

3 Answers 3

4

Following way is working for me.Hope it will work for you!

Setup of image attribute

Following is way to add the media image(media/import)

"P4102/2.jpg;P4102/3.jpg;P4102/4.jpg;P4102/5.jpg;P4102/6.jpg;"
1
  • Yep, that's similar to the format I used although I didn't include double quotes because my names don't include commas; and I also included labels as described in the Magmi Wiki: wiki.magmi.org/… Commented May 19, 2015 at 18:15
1

It seems like your image search path is not correct as it should be.

you can see below configuration which is working for me.

enter image description here

i am sure it will helps to you. Also just see for good answer given by Alex here

to manage CSV format in configurable products.

6
  • Thanks, yes I was somewhat over zealous with the search path :-) Only ../media/import was needed in my case. Changing the search path didn't affect the problem symptoms. Commented May 19, 2015 at 4:50
  • @DanielFlippance, will you please double check in import folder all images available there and should be with proper permission so magmi can access.
    – liyakat
    Commented May 19, 2015 at 10:19
  • All files exist and have read access for all users. Here's what the Dog-swatch image shown in the question looks like in media/import: -rw-r--r--+ 1 name name 162484 May 11 23:17 12288.jpg Commented May 19, 2015 at 18:11
  • it should be 755 or 775 permission for all images. may be work for you
    – liyakat
    Commented May 20, 2015 at 2:07
  • Why would Magmi need write/execute access to the files in media/import? It is only reading them. Commented May 20, 2015 at 2:24
1

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

You can solve the problem like this :

Rewrite the model class Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media in your own module and modify loadGallery() function like this

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

this solved above problem in my case.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.