Reputation: 1563
Hi I want to show only two latest product on home page and remaining product in right side bar. There is one method in my mind that either i will return only two element by following function $_productCollection=$this->getLoadedProductCollection();
But i think there should be a different approach for this. Please put some light on this
Upvotes: 1
Views: 3627
Reputation: 493
Take a look to this Magento Wiki article:
http://www.magentocommerce.com/wiki/groups/248/display_products_on_home_page#new_products
Upvotes: 0
Reputation: 219
Not exactly shure what you are looking for. Do you want to know how to filter the product collection to get the newest products or do you want a module to do this?
Module: http://www.magentocommerce.com/magento-connect/Inchoo/extension/2513/featured-products
Code to get a collection of the most recently added products.
$productsCollection = Mage::getModel("catalog/product")->getCollection()
->addAttributeToSort("entity_id","DESC")
->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds())
->setPageSize(2)
->setCurPage(1);
Upvotes: 3