Skip to content

Instantly share code, notes, and snippets.

@cornelisonc
Last active August 29, 2015 14:21
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 cornelisonc/0694438441f57e56bde6 to your computer and use it in GitHub Desktop.
Save cornelisonc/0694438441f57e56bde6 to your computer and use it in GitHub Desktop.
Get entity_id and name of products in Magento db. Don't forget your table prefix!
select cpev.entity_id as entity_id, cpev.value as product_name from catalog_product_entity_varchar as cpev
join eav_attribute as ea on cpev.attribute_id = ea.attribute_id
join eav_entity_type as eet on ea.entity_type_id = eet.entity_type_id
join catalog_product_entity as cpe on cpe.entity_id = cpev.entity_id
where ea.attribute_code = 'name'
and eet.entity_type_code = 'catalog_product'
and cpe.type_id = 'downloadable';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment