Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. SET @entityid = 24;
  2. SET @storeid = 0;
  3.  
  4. SELECT DISTINCT
  5. ea.attribute_codeid, eav.value AS 'value'
  6. FROM
  7. catalog_product_super_link AS link
  8. INNER JOIN
  9. cataloginventory_stock_status AS status ON status.product_id = link.product_id
  10. INNER JOIN
  11. catalog_product_entity e ON e.entity_id = link.product_id
  12. JOIN
  13. catalog_product_entity_int eav ON e.entity_id = eav.entity_id
  14. JOIN
  15. eav_attribute ea ON eav.attribute_id = ea.attribute_id
  16. WHERE
  17. link.parent_id = @entityid AND status.stock_status = 1
  18. AND (IF(@storeid IS NULL,0,eav.store_id = @storeid))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement