Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #194 from EmicoEcommerce/bug/pagination-issues
Browse files Browse the repository at this point in the history
Reset the pagination in query if a filter has been chosen
  • Loading branch information
Hnto authored Nov 8, 2021
2 parents 1c4f41d + fe8f32d commit dbaf1ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function renderAnchorHtmlTagAttributes(Item $item)
*/
protected function getAnchorTagAttributes(Item $item): array
{
$itemUrl = $this->getItemUrl($item);
$itemUrl = preg_replace('/&p=\d+/', '', $this->getItemUrl($item));
if ($this->filterHelper->shouldFilterBeIndexable($item)) {
return ['href' => $itemUrl];
}
Expand Down
5 changes: 4 additions & 1 deletion Model/NavigationConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ public function __construct(
*/
public function getFilterFormInput(): array
{
return $this->filterFormInputProvider->getFilterFormInput();
$filterFormInput = $this->filterFormInputProvider->getFilterFormInput();
unset($filterFormInput['p']);

return $filterFormInput;
}

/**
Expand Down

0 comments on commit dbaf1ab

Please sign in to comment.