Skip to content

Commit 9031dfe

Browse files
committed
Merge branch 'ACP2E-369' of github.com:magento-gl/magento2ce into ACP2E-369
2 parents 90df259 + aedaec0 commit 9031dfe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/code/Magento/Sales/Block/Order/Items.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function getOrder()
144144
*/
145145
private function preparePager(AbstractBlock $pagerBlock): void
146146
{
147-
$collectionToPager = $this->itemCollection;
147+
$collectionToPager = $this->createItemsCollection();
148148
$collectionToPager->addFieldToFilter('parent_item_id', ['null' => true]);
149149
$pagerBlock->setLimit($this->itemsPerPage);
150150
$pagerBlock->setAvailableLimit([$this->itemsPerPage]);
@@ -161,6 +161,9 @@ private function createItemsCollection(): Collection
161161
{
162162
$collection = $this->itemCollectionFactory->create();
163163
$collection->setOrderFilter($this->getOrder());
164+
$currentPage = (int)$this->getRequest()->getParam('p', 1);
165+
$collection->setCurPage($currentPage);
166+
$collection->setPageSize($this->itemsPerPage);
164167

165168
return $collection;
166169
}

0 commit comments

Comments
 (0)