Given a dropdown attribute such as color:
color:
Red
Green
Blue
When loading a product collection how can i load the collection based on either red, blue or green values without knowing the actual option ids?
For example:
Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('color', 'Red');
Will not work as i need to know the option id.
This means loading the attribute and getting the options id - which is going to be innefficient for a large number of attributes/options.