I have created some products in magento admin panel by giving Special Price.

So how can I get only the Special Price Products collection programmatically in Observer.php?

I have created custom module to get all special price products.

Any help are welcome with thanks.

1 Answer 1


To add a filter for special_from_date you can add this after the code above

$now = Mage::getSingleton('core/date')->gmtDate();
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->addAttributeToFilter('special_from_date', array('or'=> array(
    0 => array('date' => true, 'to' => $now),
    1 => array('is' => new Zend_Db_Expr('null')))
), 'left') 
  • I need to filter the products only based on Special Price. Get the products if only the Special Price field have value.
    – Mesk
    Jun 9, 2017 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.