I created a custom module that redirects your homepage to a landing page (CMS Page) that is a campaign page, for example, black friday.
I’ve created a new layout for the page, layout that uses a phtml to list the products from a category page. The problem is that if I have to many products, nothing listed. It displays only the header and the footer of the website, the content of the cms page is not displayed.
I use this function to load the products:
$products = Mage::getResourceModel('catalog/product_collection')
->addCategoryFilter($category_id)
->addAttributeToSelect('*');
foreach ($products as $prod) {
//list product here
}
The single solution until now is if I put the products in more than one category and load the categories in a foreach, like this:
foreach ($catIds as $category_id) {
$products = Mage::getResourceModel('catalog/product_collection')
->addCategoryFilter($category_id)
->addAttributeToSelect('*');
foreach ($products as $prod) {
//list product here
}
}
This method works but in my case I need to have all the products in one category.
Is there any way to display a large collection of products on a page?
Am I doing something wrong or this just doesn’t work because there are to many products?
Is there any limit in Magento for getting and displaying so many products from a collection?