Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET @entityid = 24;
- SET @storeid = 0;
- SELECT DISTINCT
- ea.attribute_codeid, eav.value AS 'value'
- FROM
- catalog_product_super_link AS link
- INNER JOIN
- cataloginventory_stock_status AS status ON status.product_id = link.product_id
- INNER JOIN
- catalog_product_entity e ON e.entity_id = link.product_id
- JOIN
- catalog_product_entity_int eav ON e.entity_id = eav.entity_id
- JOIN
- eav_attribute ea ON eav.attribute_id = ea.attribute_id
- WHERE
- link.parent_id = @entityid AND status.stock_status = 1
- AND (IF(@storeid IS NULL,0,eav.store_id = @storeid))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement