Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinmurphy/b688debcd424c2dc29f3 to your computer and use it in GitHub Desktop.
Save colinmurphy/b688debcd424c2dc29f3 to your computer and use it in GitHub Desktop.
Update empty descriptions and short descriptions with the title of the products
# Description
UPDATE catalog_product_entity_text as t
SET t.value = (
SELECT
v.value
FROM catalog_product_entity_varchar as v
WHERE v.entity_id = t.entity_id
AND v.store_id = t.store_id
AND v.attribute_id = 71
)
WHERE t.attribute_id = 72
AND t.value IS NULL
ORDER BY t.value_id ASC
LIMIT 1;
# Short Description
UPDATE catalog_product_entity_text as t
SET t.value = (
SELECT
v.value
FROM catalog_product_entity_varchar as v
WHERE v.entity_id = t.entity_id
AND v.store_id = t.store_id
AND v.attribute_id = 71
)
WHERE t.attribute_id = 73
AND t.value IS NULL
ORDER BY t.value_id ASC
LIMIT 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment