Display all products in Magento static block product_list

Display all products in Magento static block product_list

July 28, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Display all products in Magento static block product_list

Display All Products in Magento Static Block Without Pagination

In Magento, displaying all products from the root category in a static block without pagination can be achieved using the catalog/product_list block type. While the default code works fine for limited product listings with pagination, let’s explore how to show all products without any toolbar or pagination.

Understanding the Default Code Structure

The default code you provided is structured as follows:

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" column_count="5" template="catalog/product/list.phtml"}}

This code creates a new block instance of catalog/product_list with the following attributes:

  • Name: home.catalog.product.list
  • Alias: products_homepage
  • Column Count: 5 (defines the number of product columns)
  • Template: catalog/product/list.phtml (the template file that renders the product list)

The Challenge: Limiting Products Without Pagination

The current setup uses the default Magento pagination and toolbar. When you try to set a limit of “all” or remove the pagination, it doesn’t work as expected because the core Magento logic requires pagination for product listings.

The Solution: Customizing the Product Collection

To display all products without pagination, we need to customize the product collection used by the catalog/product_list block. Here’s how you can achieve this:

  1. Create a new extension: If you haven’t already, create a custom Magento extension. This will help keep your changes separate from the core files.

  2. Override the product list template: Create a copy of the app/design/frontend/base/default/template/catalog/product/list.phtml file in your theme directory (e.g., app/design/frontend/customtheme/default/template/catalog/product/list.phtml).

  3. Modify the product collection: In your new list.phtml file, find the line that defines the product collection:

$productCollection = $this->getProductCollection();

Replace it with a custom function to retrieve all products without pagination:

$productCollection = $this->getAllProductsWithoutPagination();
  1. Create the custom function: In your extension’s app/code/local/YourExtension/Model/Catalog/Product.php file, add the following method:
public function getAllProductsWithoutPagination()
{
    $products = Mage::getResourceModel('catalog/product_collection')
        ->addAttributeToSelect(array('name', 'short_description', 'price'))
        ->load();

    return $products;
}

This function uses the resource model to fetch all products and selects only the required attributes for better performance.

Update Your Static Block Code

With the custom template in place, update your static block code as follows:

{{block type="catalog/product_list" template="catalog/product/list.phtml"}}

Now, the catalog/product_list block will use your custom list.phtml file and display all products without any toolbar or pagination.

Conclusion

Displaying all products in a Magento static block without pagination requires customizing the product collection used by the catalog/product_list block. By overriding the default template and creating a function to retrieve all products, we can achieve this while keeping our changes separate from the core files using an extension.

Remember that showing thousands of products at once may impact your store’s performance. It’s recommended to use pagination or filters for better user experience and site optimization.

For more advanced customizations in Magento, consider exploring Laravel Company’s services for expert guidance on e-commerce development and optimization strategies.

Catalog Themes

Our network