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

You can add addFieldToFilteraddAttributeToFilter 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());
}

You can add addFieldToFilter 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());
}

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());
}
Source Link
Vishwas Bhatnagar
  • 4.7k
  • 3
  • 38
  • 61

You can add addFieldToFilter 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());
}