Displaying all products on a page allows customers to view your entire catalog from a single page.
In this tutorial, we’ll show you how to display all the products on a category page and give customers the option to do it by themselves in Magento 2. We’re using Magento 2.4.1 for this step-by-step guide.
How to Display All Products on a Category Page in Magento 2
- On the Magento admin sidebar, navigate to Stores > Settings > Configuration.
- In the left panel, navigate to Catalog > Catalog.
- Expand the Storefront section and configure the following “Product Listings”:
Configure the Product Listings in the Storefront section of the Catalog page. List Mode: You can leave the default settings or choose either of these options 一 Grid Only, List Only, Grid (default) / List, or List (default) / Grid. We’ll select the “Grid (default) / List” mode that displays products in a grid format by default on the catalog page. The customer can also switch to “List” mode to view the products in a list format.
Products per Page on Grid Allowed Values: Set the number of products that will display on each page when shown in the grid view. Make sure you separate each value with a comma.
To display all the products on a category page, add a value exceeding the total number of products in your catalog.
For example, if you have 48 products in a category, add “100, 200, 300” in the text area. Magento will default to displaying 100 products per page. Thus, all 48 products will display on the category page automatically.Products per Page on Grid Default Value: Insert the number of products that will display on each page in the grid format. This number must be a value from the “Products per Page on Grid Allowed Values” list.
Products per Page on List Allowed Values: Enter the number of products that will display on each page when shown in the list view. Separate each value with a comma.
Products per Page on List Default Value: Insert the number of products that will display on each page in the list format. The value must be from the “Products per Page on List Allowed Values” list.
- Click on the orange Save Config button on the top right.
- Navigate to System > Tool Management > Cache Management.
- Select all the invalidated cache types (Layouts and Page Cache) and click the Submit button to refresh the cache.
Select the invalidated cache types on the Cache Management page and click Submit
How to Allow Customers to Display All Products on a Category Page in Magento 2
- On the Magento admin panel, go to Stores > Settings > Configuration.
- In the left panel, navigate to Catalog > Catalog.
- Expand the Storefront section and change the Allow All Products per Page setting from No to Yes.
Select Yes in the Allow All Products Per Page dropdown on the Catalog page - Click on Save on the top right-hand side.
- Navigate to System > Tool Management > Cache Management, and refresh the cache by submitting the invalidated cache types.
Changing these settings shows an “All” value in the “Show x-number Per Page” dropdown at the bottom of the category page.