I try to add a product rather than as a new product but still be accessible from other pages such as categories or related products. In the admin panel,
Set Product as New from Date and
Set Product as New to Date has been filled in correctly. But the product still exists in the block of new products on the home page.
File edited from
This the code :
$collection = Mage::getResourceModel("catalog/product_collection'); $collection->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds()); $collection = $this->_addProductAttributesAndPrices($collection) ->addStoreFilter() // this is the code i've edited ->addAttributeToFilter('is_new_product', array('eq' => 1)) ->addAttributeToSort('news_from_date', 'asc') ->setPageSize($this->getProductsCount()) ->setCurPage(1);
Can someone please explain?