I'm having a little dilemma. The following code correctly displays the assigned products while ignoring the minimal pricing. The "as low as" option.
<?php
$cat_id = 123; // category id
$category = Mage::getModel('catalog/category')->load($cat_id);
$todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
$_products = $category->
getProductCollection()->
addCategoryFilter($category)->
addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))->
addAttributeToFilter('news_to_date', array('or'=> array(
0 => array('date' => true, 'from' => $todayDate),
1 => array('is' => new Zend_Db_Expr('null')))
), 'left')->
addAttributeToSelect('*');
if (($this->getProductCollection()) && $_products->getSize()): ?>
Minor adjustment of last line, correctly shows the "as low as" price, but ends up adding un-assigned products within said category.
if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
What am I missing? Thanks