I have created custom dropdown field in product page using admin backend. I need to check all dropdown values in query. I can get single value only. I dont know how to set multiple values in query.
$sAttributeName = 'new';
$mOptionValue = Array('Both','Yes','Site1');
$productNewObj = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('status', array('eq' => '1'))
->addAttributeToFilter('visibility', $visibility)
->addFieldToFilter(
$sAttributeName,
array('eq' => Mage::getResourceModel('catalog/product')->getAttribute($sAttributeName)
->getSource()->getOptionId($mOptionValue)
))
I tried may methods, it does not support multiple values. I need to set multi values in getOptionId()
Advance Thanks
Kumar.R