Questions tagged [pagination]

Denotes questions related to collections pagination.

Filter by
Sorted by
Tagged with
17 votes
1 answer
30k views

how to add pagination on custom collection in Magento 2

I am working on custom module. How can i use default magento pagination with my custom collection and also set custom limits on that?
user avatar
11 votes
1 answer
1k views

Magento 2 - All products page with layered navigation and pagination

I want to create all product page with the filters, toolbar, pagination. I can do it by creating a new category with the name All Products and assign all products in it. But I guess this is not a ...
user avatar
10 votes
5 answers
4k views

Pagination and Sorting not working

For my custom module I have get product by manufacturer. For template I have copied list.phtml. On the template file pagination appears but it shows all product instead of selected limit per page. ...
user avatar
  • 5,813
7 votes
1 answer
2k views

Show different number of products in category page

I am trying to show different number of products in category but it is only working on page 1. I want to show 22 products on page1 and rest all the pages 20 products per page. I managed to change by ...
user avatar
  • 2,325
7 votes
1 answer
876 views

Using repositories on frontend with paging

I've created a CRUD module in the proper way, with service contracts (SC). I'm using these SC in the backend with ui-components and everything. This works nicely, but I want to use the repository's ...
user avatar
  • 195k
6 votes
2 answers
2k views

Pagination count and collection display issue for custom collection

I have displayed custom collection on my custom page. The issue i am facing is that pagination is supposed to limit the collection per page but here in frontend whole collection is displayed on one ...
user avatar
  • 602
5 votes
4 answers
8k views

How to update category page with custom filters, and also layered navigation, Magento 2.1

I need to update category page collection by filtering restricted SKUs. As like $collection->getSelect()->where("`e`.`sku` IN('24-MB04', '24-MB03', '24-MB02')"); Above query gives collection ...
user avatar
5 votes
1 answer
2k views

Changing paging options in admin grid

I've build a Magento 2 admin grid using ui-components. But I don't want the default paging of 20, 30, 50, .... I want my own values. For example 1,2 and 3. I remember that in a beta version I could ...
user avatar
  • 195k
5 votes
3 answers
8k views

Why is setPageSize() and setCurPag‌​e( ) functions not working with the collection created with \Magento\Framework\Data\CollectionFactory?

This is my block file, everything is working fine except setPageSize() and setCurPage() functions at last. Regardless of these two filters it is allowing all the rows to be fetched. What could be the ...
user avatar
4 votes
6 answers
4k views

After Upgrading to Magento 2.4.3 the pagination is not working anymore

After upgrading from Magento 2.4.2-p1 to 2.4.3 the pagination is not showing up anymore on category and search result pages. I tested disabling the Magento 2 Infinite Scroll extension from Weltpixel ...
user avatar
4 votes
2 answers
1k views

Magento SEO implement rel="prev" and rel="next" meta tags

I'm attempting to improve SEO for my product catalog by implementing the <link rel='next' href='..'> and <link rel='prev' href='..'> head meta tags for catalog pages with several pages of ...
user avatar
  • 1,993
4 votes
1 answer
2k views

Magento 2: Custom added ajax pagination not working

I have added an ajax pagination in a custom module collection. I have a total of 50 items in the collection and the limit per page is 5; that should show total page of 10. Instead, it is showing only ...
user avatar
  • 3,179
4 votes
2 answers
5k views

Pagination Missing

I am working with Magento2. Category pages seem to be not calling the Pagination at all. I can see in toolbar.phtml <?php echo $block->getPagerHtml() ?> it is there correctly but doesn't ...
user avatar
3 votes
2 answers
2k views

Magento 2 Pagination not working on search results - Porto Theme

Pagination works when I navigate to a page, but when I search, it doesn't. This is inconvenient when there are 100 results, but when there are 1000+, eventually it just times out and throws a 524 ...
user avatar
3 votes
1 answer
6k views

Magento count pagination sizes

Is there any way to count how many pages there is in pagination? I'm not talking about Collection count, but something like pagination count maybe?
user avatar
  • 191
3 votes
2 answers
8k views

Create magento pagination in custom product collection inside phtml file

First of all, i didn't create custom module to handle this product collection, so, i just put model inside phtml file, i know it's bad implementation, i'm new in magento and i have to do small ...
user avatar
3 votes
1 answer
2k views

Pagination not showing on any page with products

I'm at a loss as to what to do next, I've reviewed all of the posts on the site and tried every solution, but still I am unable to see pagination of the products, the toolbar is simply not displaying? ...
user avatar
3 votes
0 answers
141 views

Pagination Button in the "my order pages" are not working Magento 2

Pagination button 1,2 next are not working not taking to next page they are appearing like disabled in Magento 2.2.7
user avatar
  • 61
3 votes
0 answers
1k views

Magento 2.2.6 Pagination not working in Category pages

We have upgraded Magento 2.2.3 to 2.2.6. After upgrade page filter is not working. It is loading all the products in category page. The drop down still says 9,18,27. But it is displaying all ...
user avatar
  • 1,739
3 votes
2 answers
425 views

Is this possible? Back to last viewed category page after viewing details?

Example: A category has 72 items in it In catalog settings we have set the number of items to show per page to 24 So in front end there will be 3 pages with 24 items each. Now when a customer views ...
user avatar
  • 315
2 votes
2 answers
12k views

Add pagination to any block's collection

I have a number of collections which have blocks that output the contents to frontend routes (My Account, frontend features). I have need to paginate some of these. I know that pagination methods ...
user avatar
  • 35.6k
2 votes
1 answer
1k views

Remove pagination from order listing in frontend customer account?

I want list all the orders in a single page. how I remove pagination from my orders page in my account dashboard.
user avatar
  • 360
2 votes
2 answers
2k views

How to add pagination at top and bottom of the product page in magento 2

Please help on adding pagination at top and bottom of the product page in magento 2 .
user avatar
2 votes
2 answers
457 views

Pagination (block) missing

Most of the times I find a solution here, but in this case it's a little more complicated. I followed the instructions given in several posts, but none of them worked. The pagination block should be ...
user avatar
  • 43
2 votes
1 answer
2k views

Hide item count and pagination from category page in Magento2

Is it possible to hide pagination and item count from Magento 2? Preferably only for specific category but if not possible then for all categories... ............
user avatar
  • 327
2 votes
2 answers
2k views

How can I hide the Paging in the Grid?

I used the Grid to create a report which shows at most 5 rows so I'd like to hide the Paging altogether. Does anyone know how to hide it? Thank you for any help! Tim
user avatar
2 votes
1 answer
2k views

Magento2 : Pagination - jump to top of page [closed]

I have problem with next/prev Buttons in Pagination. If user clicks button, it reloads the page (i think) in Ajax at the current page scroll position. Is there any method to force the reload jump to ...
user avatar
  • 93
2 votes
1 answer
4k views

Magento2: How to get total page number of category?

I want to show Title of category page based current page and total page. for example: Category Electronics has total 20 page and i am on 2nd page. I want to show 2 out of 20 pages. I have tried below ...
user avatar
  • 1,677
2 votes
3 answers
644 views

Magento2.3 : Pagination - jump to top of pagination at PLP page

I have a problem with Buttons in Pagination. If the user clicks the button, it reloads the page with loader and settles down at the current page scroll position. Is there any method to forcefully load ...
user avatar
2 votes
4 answers
2k views

How to call Mage_Page_Block_Html_Pager class in list.phtml

I am wanting to include a larger than normal 'next page' type button in the list.phtml template whilst still having the normal pagination from pager.phtml The function I'm wanting to use is found in ...
user avatar
  • 448
2 votes
1 answer
513 views

How to create pagination in Magento 2 using Module?

I am creating a module with custom tab in Magneto 2 front end in which i have listed some product, now i want to create pagination for the same how would i do that. Controller File : <?php ...
user avatar
  • 536
2 votes
1 answer
610 views

Magento 2 Pagination, from page 2 no results found

I have an issue on my production site running magento 2.3.3, results of pagination from the page 2 and above don't show any results to be more clear: https://mywebsite/products?p=1 -> function ...
user avatar
  • 143
2 votes
1 answer
276 views

Magento 2: Category Pages from Page 2 shows without products always

I'm trying to migrate a Magento 1.9.3.6 to Magento 2.3 and I found a strange problem. I've got some categories with thousands of products, I can see 64 products in my first page or 16, but if I go to ...
user avatar
2 votes
1 answer
125 views

Bug change limit from toolbar advance search collection

i face strange issue using advance search filter. When i select multiselect from advance search they {baseUrl}/catalogsearch/advanced/ when apply search url bocome like this. {baseUrl}/...
user avatar
2 votes
1 answer
266 views

Paging controls not showing in Mage2 listing page (ui_component)

Here's the relevant portion of the XML to create a listing page. For some reason the paging component won't show. I've been looking over this for hours, any idea where I need to look next to enable ...
user avatar
  • 1,366
2 votes
1 answer
242 views

Debug Magento speed - slow on 'All' products select

I have around 80 products in my store - on selecting 'ALL' from the tool bar on the product list.phtml page the site is very slow to respond (and sometimes doesn't). Where do I start debugging this ...
user avatar
2 votes
1 answer
1k views

Pagination missing on category pages?

The pagination is missing on my toolbar on category pages, it works for the search results. I debugged the code and figured what the problem is. In the Toolbar block there is a function getPagerHtml. ...
user avatar
  • 882
2 votes
3 answers
538 views

Add Pagination by Text box

I would like to use pagination by text box where client can type the number of product page and click go/submit button.
user avatar
2 votes
2 answers
263 views

Saving a product collection and showing parts of it per page, without reloading

In catalog/product/list.phtml, how can I always use the products from a single, saved product collection? Is there a way to load a product collection, save it, then show some of these products (e.g. ...
user avatar
2 votes
1 answer
580 views

Pagination - How to add code to first page only

Please could someone point me in the right direction of how to add code to only the first page of our paginated results (Magento categories)? This is what I've tried so far: if (!isset($_SERVER['...
user avatar
  • 167
2 votes
1 answer
382 views

Collection pagination skipping records

I'm having trouble with Magento's built-in collection paging skipping over many records. I am attempting to optimize a product feed generator that dumps a bunch of product data to a file, and have ...
user avatar
  • 141
2 votes
1 answer
210 views

I want to create a custom model that pulls data from an external system via web service calls

I want to be able to page through this data and I was wondering if Magento supports the ability to force a new call into the model whenever a user clicks on the next button, or the previous button. E....
user avatar
2 votes
2 answers
582 views

Pagination next/prev Jump, not working

In template file Magento_Theme/templates/html/pager.phtml the following code is never displayed: <?php if ($block->canShowPreviousJump()): ?> <li class="item"> <a class="...
user avatar
  • 581
2 votes
1 answer
1k views

Magento 2: Change per page option for customer, Order & product Admin Grid

As a default, Magento Admin has Paging option as 20, 30, 50,100,200 But I need to change it for Product, Customer & Order Grid. I override the below files: vendor/magento/module-customer/view/...
user avatar
  • 1,946
2 votes
1 answer
1k views

Magento SEO Pagination like /page/2 instead of ?p=2

i am trying to play around with pager.phtml, basicaly i do not like the ?p=2 etc that magento use. I have come through this code that will change the pagination to what i want but this brings of ...
user avatar
2 votes
0 answers
10 views

product appears more than once in magento 1.9 pagination

I have a problem in magento 1.9 in some categories some products that appear on the first page of pagination again Personal appear on the pages, replacing like this or next to some products. Has ...
user avatar
  • 197
2 votes
1 answer
171 views

Magento 2 Paginate custom collection using ViewModel

Magento 2 encourages the usage of view models instead of filling the blocks with business logic. A view model is an abstraction of the view exposing public properties and commands. It allows ...
user avatar
  • 450
2 votes
1 answer
556 views

Magento2 - Pagination getPagerHtml() returns empty

I am trying to get pagination on my collection in block when i call from PHTML file it returns nothing, not showing pagination but $pageSize is working fine. This function getPagerHtml() in phtml is ...
user avatar
  • 1,331
2 votes
0 answers
28 views

How to create a pagination on product page for the reviews

I am trying to create pagination on product page just to keep the review down. I have over 50 reviews for product is there anyway I could limit it to 10. Is there anyway I could follow some codes or ...
user avatar
2 votes
0 answers
410 views

how to do pagination to display collection at admin panel custom table in magento 2

I'm trying to create a pagination for my collection to display in a .phtml file, but am getting error page Invalid template file: 'Magento_Theme::html/pager.phtml. Here is my code: code/...
user avatar