Im trying to limit the number of returned results manually in a copy of the list.phtml template, but its turning out to be alot harder than I anticipated.
Ive tried man
As was mentioned, the productCollection
already has page size set. There is another way to get the collection though; via the catalog/product
Model:
$productCollection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect(
array('name', 'image', 'price')
)
->addIdFilter(
array('1', '2')
)
->setPageSize( 2 )
->load();
;
return $productCollection->getSelect()->__toString();
The resulting query (and ultimately object) contains the LIMIT syntax:
SELECT `e`.* ... WHERE (`e`.`entity_id` IN('1', '2')) LIMIT 2;
Is that what you were asking?