Skip to content

Commit

Permalink
MAGETWO-87342: #12860: Sort by Product Name doesn't work with Ancor a…
Browse files Browse the repository at this point in the history
…nd available filters. #1192

 - Merge Pull Request magento-engcom/magento2ce#1192 from p-bystritsky/magento2:ISSUE-12860
 - Merged commits:
   1. e5b030a
   2. d80c790
  • Loading branch information
Oleksii Korshenko committed Feb 1, 2018
2 parents d79156c + d80c790 commit f08b36f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,21 @@ protected function _renderFiltersBefore()
'search_result.'. TemporaryStorage::FIELD_SCORE . ' ' . $this->relevanceOrderDirection
);
}
return parent::_renderFiltersBefore();
}

/**
* @inheritdoc
*/
protected function _beforeLoad()
{
/*
* This order is required to force search results be the same
* for the same requests and products with the same relevance
* NOTE: this does not replace existing orders but ADDs one more
*/
$this->setOrder('entity_id');

return parent::_renderFiltersBefore();
return parent::_beforeLoad();
}

/**
Expand Down

0 comments on commit f08b36f

Please sign in to comment.