Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oreales/8966361 to your computer and use it in GitHub Desktop.
Save oreales/8966361 to your computer and use it in GitHub Desktop.
#atributos de catalogo creados por el usuario
SELECT attribute_code FROM eav_attribute AS eavAttr
WHERE eavAttr.entity_type_id = 4
AND eavAttr.is_user_defined = 1;
#atributos de catalogo NO creados por el usuario (magento core)
SELECT attribute_code, attribute_id FROM eav_attribute AS eavAttr
WHERE eavAttr.entity_type_id = 4
AND eavAttr.is_user_defined = 0;
#atributos de catalogo usados en filtrado (layer)
SELECT attribute_code FROM `catalog_eav_attribute` AS catAttr
LEFT JOIN eav_attribute AS eavAttr USING(attribute_id)
WHERE eavAttr.entity_type_id = 4
AND catAttr.is_filterable = 1;
#atributos de catalogo usados en filtrado de busquedas (search layer)
SELECT attribute_code FROM `catalog_eav_attribute` AS catAttr
LEFT JOIN eav_attribute AS eavAttr USING(attribute_id)
WHERE eavAttr.entity_type_id = 4
AND catAttr.is_filterable_in_search = 1;
#atributos que vienen en los listados
SELECT attribute_code FROM `catalog_eav_attribute` AS catAttr
LEFT JOIN eav_attribute AS eavAttr USING(attribute_id)
WHERE eavAttr.entity_type_id = 4
AND catAttr.used_in_product_listing = 1;
#atributos con los qu ese puede crear un producto configurable
SELECT attribute_code FROM `catalog_eav_attribute` AS catAttr
LEFT JOIN eav_attribute AS eavAttr USING(attribute_id)
WHERE eavAttr.entity_type_id = 4
AND eavAttr.frontend_input = 'select'
AND catAttr.is_global = 1;
AND catAttr.is_configurable = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment