Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
preexisting-custom-layout-updates.sql
# 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
You can’t perform that action at this time.