Created
January 28, 2020 20:43
-
-
Save mpchadwick/d732c289120ef9955e77e5801dd2fc1d to your computer and use it in GitHub Desktop.
preexisting-custom-layout-updates.sql
This file contains 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
# Categories | |
SELECT | |
ea.entity_type_id, | |
ea.attribute_id, | |
eet.entity_type_code, | |
ccet.value | |
FROM eav_attribute ea | |
LEFT JOIN eav_entity_type eet | |
ON eet.entity_type_id = ea.entity_type_id | |
LEFT JOIN catalog_category_entity_text ccet | |
ON ccet.attribute_id = ea.attribute_id | |
WHERE ea.attribute_code LIKE '%custom_layout_update%' | |
AND eet.entity_type_code = 'catalog_category' | |
AND ccet.value IS NOT NULL | |
AND ccet.value != ''\G | |
# Products | |
SELECT | |
ea.entity_type_id, | |
ea.attribute_id, | |
eet.entity_type_code, | |
ccet.value | |
FROM eav_attribute ea | |
LEFT JOIN eav_entity_type eet | |
ON eet.entity_type_id = ea.entity_type_id | |
LEFT JOIN catalog_product_entity_text ccet | |
ON ccet.attribute_id = ea.attribute_id | |
WHERE ea.attribute_code LIKE '%custom_layout_update%' | |
AND eet.entity_type_code = 'catalog_product' | |
AND ccet.value IS NOT NULL | |
AND ccet.value != ''\G | |
# CMS Pages | |
SELECT | |
layout_update_xml | |
FROM cms_page | |
WHERE layout_update_xml IS NOT NULL | |
AND layout_update_xml != ''\G |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment