Skip to content

Commit

Permalink
magento#12860: Sort by Product Name doesn't work with Ancor and avail…
Browse files Browse the repository at this point in the history
…able filters.

(cherry picked from commit e5b030a)
  • Loading branch information
p-bystritsky authored and ihor-sviziev committed Jul 19, 2018
1 parent bfbdfa5 commit 045b95c
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,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 045b95c

Please sign in to comment.