Skip to content

Commit b011c24

Browse files
author
Oleksii Korshenko
authored
MAGETWO-87587: [2.3] Fix Sort by Product Name #13468
2 parents 9df49a6 + 9dd6cdc commit b011c24

File tree

1 file changed

+8
-2
lines changed
  • app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext

1 file changed

+8
-2
lines changed

app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,21 @@ protected function _renderFiltersBefore()
366366
'search_result.'. TemporaryStorage::FIELD_SCORE . ' ' . $this->relevanceOrderDirection
367367
);
368368
}
369+
return parent::_renderFiltersBefore();
370+
}
369371

372+
/**
373+
* @inheritdoc
374+
*/
375+
protected function _beforeLoad()
376+
{
370377
/*
371378
* This order is required to force search results be the same
372379
* for the same requests and products with the same relevance
373380
* NOTE: this does not replace existing orders but ADDs one more
374381
*/
375382
$this->setOrder('entity_id');
376-
377-
return parent::_renderFiltersBefore();
383+
return parent::_beforeLoad();
378384
}
379385

380386
/**

0 commit comments

Comments
 (0)