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.

  • @Nolwennig, i have used like that but it's not working. so can tell me that what should be issue there? my code is like that in xml: <referenceContainer name="content"> <referenceBlock name="product_list_toolbar"> <action method="setDefaultGridPerPage"> <argument name="limit" xsi:type="string">3</argument> </action> </referenceBlock> </referenceContainer> – Sarfaraj Sipai Nov 16 '17 at 6:20
  • @Nolwennig, hello Have you get anything about this ... ? – Sarfaraj Sipai Dec 12 '17 at 9:15

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 – Sarfaraj Sipai Dec 13 '17 at 5:58
  • nothing in log? – Nolwennig Dec 13 '17 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. – Sarfaraj Sipai Dec 13 '17 at 10:57
  • try with built-in theme and compare processflowif needed – Nolwennig Dec 13 '17 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, privacy policy and cookie policy

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