0

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.

0

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') 
| improve this answer | |
  • 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 '17 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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