Skip to content

Commit

Permalink
#12860: Sort by Product Name doesn't work with Ancor and available fi…
Browse files Browse the repository at this point in the history
…lters.
  • Loading branch information
p-bystritsky committed Jan 10, 2018
1 parent 0d04ec6 commit e5b030a
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

2 comments on commit e5b030a

@LRV
Copy link

@LRV LRV commented on e5b030a Jul 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't this added to 2.1, i manual added it to 2.1.14 and works fine

@Frankhendriks
Copy link

@Frankhendriks Frankhendriks commented on e5b030a Aug 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you add it in 2.1? i don't have Magento folder under app/code but only in vendor/magento
i am working in 2.1.17, and i don't have this file from above.

Please sign in to comment.