Skip to main content
2 of 2
added 4 characters in body
Vishwas Bhatnagar
  • 4.7k
  • 3
  • 38
  • 61

You can add addAttributeToFilter to the collection for feature attribute like

$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToFilter('feature', array('eq' => 'Yes')); // or 0 or 1 iff you are using Boolean values

foreach ($collection as $product) {
    //var_dump($product);
    var_dump($product->getData());
}
Vishwas Bhatnagar
  • 4.7k
  • 3
  • 38
  • 61