Skip to content

Commit cc5798a

Browse files
igrybkovAndrii Kasian
authored andcommitted
MAGETWO-34231: Pagination not working on my downloadable products tab in customer account
1 parent 78645f6 commit cc5798a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected function _prepareLayout()
9999
'downloadable.customer.products.pager'
100100
)->setCollection(
101101
$this->getItems()
102-
);
102+
)->setPath('downloadable/customer/products');
103103
$this->setChild('pager', $pager);
104104
$this->getItems()->load();
105105
foreach ($this->getItems() as $item) {

app/code/Magento/Theme/Block/Html/Pager.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,15 @@ public function getPagerUrl($params = [])
446446
$urlParams['_fragment'] = $this->getFragment();
447447
$urlParams['_query'] = $params;
448448

449-
return $this->getUrl('*/*/*', $urlParams);
449+
return $this->getUrl($this->getPath(), $urlParams);
450+
}
451+
452+
/**
453+
* @return string
454+
*/
455+
protected function getPath()
456+
{
457+
return $this->_getData('path') ?: '*/*/*';
450458
}
451459

452460
/**

0 commit comments

Comments
 (0)