سؤال

I want to get disabled products id's and products price in magento 2 by using SQL Query ?

By using this i'm getting disabled product but how to get price for that products.

SELECT entity_id FROM `catalog_product_entity_int`
WHERE attribute_id = (
SELECT attribute_id FROM `eav_attribute`
WHERE `attribute_code` LIKE 'status'
) AND `catalog_product_entity_int`.value = 2
هل كانت مفيدة؟

المحلول

Try this:

SELECT entity_id, value as price from catalog_product_entity_decimal
WHERE entity_id IN (SELECT entity_id FROM `catalog_product_entity_int`
WHERE attribute_id = (
SELECT attribute_id FROM `eav_attribute`
WHERE `attribute_code` LIKE 'status'
) AND `catalog_product_entity_int`.value = 2) AND attribute_id = 77;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top