Created
October 8, 2014 22:53
-
-
Save Stasevi4/bbe258e36f479638d38f to your computer and use it in GitHub Desktop.
Magento Update product set first image as default image , small_image, thumbnail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (70, 71, 72) <------------- Change attribute id (Image, small_image, thumbnail) | |
AND mgv.position = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment