The featured products code below seems to indicate that there is a method in admin to indicate which products should be included in the featured products displayed. Also that these products will be displayed randomly. I have been through all of the following areas in admin and found no method to specify that a product should be included:
• Manage Categories and all respective tabs available for an individual category • Manage Products and all respective tabs available for an individual product • Individual Product in admin that showed as featured on the home page • System Configuration – sometimes tools are set up with some feature controls there • Promotion • CMS/Static Blocks • CMS/Widgets
Am I misreading the code itself? Is there any are in admin I failed to review? Any feedback would be greatly appreciated.
class Jag_Featuredproduct_Block_Featuredproduct extends Mage_Catalog_Block_Product_Abstract
{
public function _prepareLayout()
{
return parent::_prepareLayout();
}
public function getFeaturedproducts() {
$storeId = Mage::app()->getStore()->getId();
$p = Mage::getModel('catalog/product')->setStore($storeId)->getCollection()->addStoreFilter($storeId)
->addAttributeToSelect('*')
//->addFieldToFilter('status',array('eq'=>1))
->addFieldToFilter('is_featured', array('eq' => 1));
//$p->getSelect()->order('updated_at DESC');
$p->getSelect()->order(new Zend_Db_Expr('RAND()'));
$p->getSelect()->limit(8);
//echo $p->getSelect()->__toString(); exit();
return $p->getData();
}
}