I have a 5 or more categories. There is a specific category set for a 1-column-layout and another are as 2-column-left layout.

For a 1-column-layout category i want to show limited product like 6 product limit after that pagination will appear and same for second specific category show product 10 after that show pagination.

please see image.

enter image description here In Layout Update Xml field add xml code for product limit.


3 Answers 3


Try this, i've tested and worked in my project:
This was related to module Magento_CatalogSearch etc/search_request.xml
Step 1: create new module.
Step 2: create file etc/search_request.xml with this content:

<?xml version="1.0"?>
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
<requests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <request query="catalog_view_container" index="catalogsearch_fulltext">
            <dimension name="scope" value="default"/>
            <query xsi:type="boolQuery" name="catalog_view_container" boost="1">
                <queryReference clause="must" ref="category"/>
                <queryReference clause="must" ref="price"/>
                <queryReference clause="must" ref="visibility"/>
            <query xsi:type="filteredQuery" name="category">
                <filterReference clause="must" ref="category_filter"/>
            <query xsi:type="filteredQuery" name="price">
                <filterReference clause="must" ref="price_filter"/>
            <query xsi:type="filteredQuery" name="visibility">
                <filterReference clause="must" ref="visibility_filter"/>
            <filter xsi:type="termFilter" name="category_filter" field="category_ids" value="$category_ids$"/>
            <filter xsi:type="rangeFilter" name="price_filter" field="price" from="$price.from$" to="$price.to$"/>
            <filter xsi:type="termFilter" name="visibility_filter" field="visibility" value="$visibility$"/>
            <bucket name="price_bucket" field="price" xsi:type="dynamicBucket" method="$price_dynamic_algorithm$">
                    <metric type="count"/>
            <bucket name="category_bucket" field="category_ids" xsi:type="termBucket">
                    <metric type="count"/>
        <!-- custom change size, which will make limit 10 products in category page -->

Which actually change in the code is you set size = 10, or what ever number you want.


Based on Magento/Catalog/view/frontend/layout/catalog_category_view.xml and on Magento/Theme/Block/Html/Pager.

You can try with something like this:

<referenceContainer name="content">
  <referenceBlock name="product_list_toolbar_pager">
    <action method="setLimit">
      <argument name="limit" xsi:type="string">3</argument>

or using xsi:type="number" instead of xsi:type="string":

<argument name="limit" xsi:type="number">3</argument>
  • i have done same as above but it's not working Dec 13, 2017 at 5:58
  • nothing in log?
    – Nolwennig
    Dec 13, 2017 at 9:55
  • Thanks for reply, but still not any change i think there is a custom theme issue. if you have any idea about his then let me known thanks once again. Dec 13, 2017 at 10:57
  • try with built-in theme and compare processflowif needed
    – Nolwennig
    Dec 13, 2017 at 11:03

As far as I am aware for this to work you need to have the value entered in Products per Page on Grid Allowed Values (Stores > Configuration > Catalog > Catalog > Storefront) then it is available to use via XML using:

<referenceBlock name="product_list_toolbar">
    <action method="setDefaultGridPerPage">
         <argument name="limit" xsi:type="string">20</argument>

see also - Magento LayoutXML Update Default Products per Page Grid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.