Magento - How to display ALL PRODUCTS in the homepage?

Magento - How to display ALL PRODUCTS in the homepage?

October 1, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento - How to display ALL PRODUCTS in the homepage?

Display All Products on Your Magento Homepage

Are you looking to display all products on your Magento homepage without manually adding each category ID? You’re not alone! In this guide, we’ll walk through the process of listing all products in your Magento store’s main page.

Understanding the Default Magento Setup

Magento is designed with a logical structure that separates static content from dynamic content. The default home page (CMS page) doesn’t load product collections by default; it loads static blocks and other CMS content.

To display all products, we need to override this behavior and load the entire catalog in the homepage. Let’s dive into the code changes needed.

Overriding the Homepage Template

First, you’ll want to create a custom template for your homepage that inherits from Magento_Theme/templates/html/root.phtml. You can place it in your theme directory:

app/design/frontend/Vendor/yourtheme/Magento_Theme/templates/html/root.phtml

In this new file, add the following code snippet after line 107 (the opening <body> tag):

<?php
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->load();

foreach ($collection as $product):
    $_product = Mage::getModel('catalog/product')->load($product->getId());
?>
<div class="product">
  <a href="<?php echo $_product->getProductUrl() ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(200)->__toString(); ?>" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" /></a>
  <h2><a href="<?php echo $_product->getProductUrl() ?>"><?php echo $_product->getName() ?></a></h2>
  <div class="product-desc"><?php echo $_product->getShortDescription(); ?></div>
  <p class="price"><?php echo $this->getPriceHtml($_product) ?></p>
</div>
<?php endforeach; ?>

This code loads the entire product collection and loops through each item, displaying basic product information including name, short description, image, and price.

Updating Your Homepage

Next, you need to update your homepage CMS page. Go to Content -> Pages and edit the home page. Set the “Page Layout” field to “1 column”.

Conclusion

Displaying all products on your Magento homepage is a straightforward process that involves creating a custom template and updating your CMS page layout.

Remember, displaying hundreds of products can impact your site’s performance and user experience. Ensure you have proper caching mechanisms in place and consider using filters or paginators to control the number of displayed items.

For more advanced product display options like sorting, filtering, and pagination, I recommend exploring Magento modules provided by Magento Company Limited at https://laravelcompany.com/magento. Their extensions offer robust solutions for managing complex catalog structures.

Catalog Themes Deployment

Our network