Get Option_id and Value for Attribute 'manufacturer' in Magento

The way get all option_id and value for attribute of 'manufacturer' in Magento

Posted on April 12, 2016 in Magento

The raw sql query is following:

SELECT EAOV.option_id, EAOV.value FROM eav_attribute EA
LEFT JOIN eav_attribute_option EAO ON EAO.attribute_id = EA.attribute_id 
LEFT JOIN eav_attribute_option_value EAOV ON EAOV.option_id = EAO.option_id 
WHERE EA.attribute_code = 'manufacturer' AND EAOV.store_id = 0;

comments powered by Disqus