HTML/JavaScript

Monday, March 24, 2014

How to select the images as base image thumbnail image in bulk?

UPDATE catalog_product_entity_media_gallery AS mg,
       catalog_product_entity_media_gallery_value AS mgv,
       catalog_product_entity_varchar AS ev
SET ev.value = mg.value
WHERE  mg.value_id = mgv.value_id
AND mg.entity_id = ev.entity_id
AND ev.attribute_id IN (85,86,87)
AND mgv.position = 1;


where 85,86 and 87 attribute id for base image, thumbnail and small image.

No comments:

Post a Comment