Guest User

Untitled

a guest
Oct 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. select attribute_id from eav_attribute
  2. where entity_type_id = 4 and attribute_code = 'name';
  3.  
  4. select attribute_id from eav_attribute
  5. where entity_type_id = 3 and attribute_code = 'name';
  6.  
  7. select cpe.sku 'Sku', ccev.value 'Category Name', cpev.value 'Product Name'
  8. from catalog_product_entity cpe
  9. join catalog_product_entity_varchar cpev
  10. on cpe.entity_id = cpev.entity_id
  11. join catalog_category_product ccp
  12. on ccp.product_id = cpe.entity_id
  13. join catalog_category_entity_varchar ccev
  14. on ccev.entity_id = ccp.category_id
  15. where cpev.attribute_id = 71 -- THIS IS THE PRODUCT NAME
  16. and ccev.attribute_id = 41; -- THIS IS THE CATEGORY NAME
Add Comment
Please, Sign In to add comment