How to get Special price less or not
<?php
$categoryIds = array(469);//category id
$todayDate = date('m/d/y');
$tomorrow = mktime(0, 0, 0, date('m'), date('d'), date('y'));
$tomorrowDate = date('m/d/y', $tomorrow);
$collection = Mage::getModel('catalog/product')
->getCollection()
->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')
->addMinimalPrice()->addFinalPrice()
->addAttributeToSelect('*')
->addAttributeToFilter('category_id', array('in' => $categoryIds))
->addAttributeToFilter('special_from_date', array('date' => true, 'to' => $todayDate))
->addFinalPrice()
->getSelect()
->where('price_index.final_price < price_index.price')
->addAttributeToFilter('special_to_date', array('or'=> array(
0 => array('date' => true, 'from' => $tomorrowDate))
), 'left')
?>
I want to display if special price less then the original price how to get that ?
Best Answer