Skip to content

Commit 8016fcf

Browse files
author
Stanislav Idolov
authored
ENGCOM-2432: [Backport] Fix Sort by Product Name #16945
2 parents f7731d5 + 543e3a9 commit 8016fcf

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
@@ -350,15 +350,21 @@ protected function _renderFiltersBefore()
350350
'search_result.'. TemporaryStorage::FIELD_SCORE . ' ' . $this->relevanceOrderDirection
351351
);
352352
}
353+
return parent::_renderFiltersBefore();
354+
}
353355

356+
/**
357+
* @inheritdoc
358+
*/
359+
protected function _beforeLoad()
360+
{
354361
/*
355362
* This order is required to force search results be the same
356363
* for the same requests and products with the same relevance
357364
* NOTE: this does not replace existing orders but ADDs one more
358365
*/
359366
$this->setOrder('entity_id');
360-
361-
return parent::_renderFiltersBefore();
367+
return parent::_beforeLoad();
362368
}
363369

364370
/**

0 commit comments

Comments
 (0)