The following MySQL query returns the status of every product in the Magento database.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
SELECT cpe.sku, q.product_status FROM catalog_product_entity cpe JOIN (SELECT entity_id AS product_id, value AS product_status FROM catalog_product_entity_int WHERE entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product') AND attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'status' AND entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product'))) q ON cpe.entity_id = q.product_id; |
Status 1: active Status 2: not active