I’ve a recent products action in my Catalog/Product controllers.
I retrieve all the product sorted by entity id. Works great ok.
The problem is I just want to show 20 products in 4 pages.
I tried to extend
Mage_Catalog_Block_Product_List and override
_getProductCollection() and I did something like this:
$this->_productCollection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToSort('entity_id', 'desc') ->addStoreFilter();
And the important part:
If I ‘dump’ the returned Object I’ve something like this:
[“limitcount”] => int(5)
[“limitoffset”] => int(0)
So it looks to be overriden by the paginator.
Do you know a way to limit properly the number of result?
For both optimization and presentation I actually don’t want to retrieve all the products collection.