1

I have imported images using a 3rd party import tool.

I'm importing several files and one sets the small_image flag the tool does not allow me to flag exclude.

The problem is we don't want the small image to show on the product page as in about 50% of our products it will be a duplication.

Is there a way either in the database or via a script that will allow me to set all images that are small images to exclude ?

Any help would be welcome

2
  • Have you given label to your small images? Commented Jun 25, 2015 at 11:49
  • No, but I could if its the only way to exclude it Commented Jun 25, 2015 at 11:52

1 Answer 1

0

Ok first upload those small images with same label.

Then run this code in sql

UPDATE catalog_product_entity_media_gallery_value 
SET disabled = 1
WHERE label = 'your_small_image_label'

This should set your all small image to Exclude.

Generally we are going to catalog_product_entity_media_gallery_value table and setting all item having label as your_small_image_label.

Hope this helps.

2
  • Thinking about it we don't want the alt text to be the same label on the cat pages. is there a way to to look at the small image flag in the DB ? Thanks Commented Jun 25, 2015 at 13:11
  • You can change alt text for small images to product title with prefix or something else later in catalog/view/media.phtml Commented Jun 25, 2015 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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