Skip to content

Commit 9dd6cdc

Browse files
author
Oleksii Korshenko
committed
MAGETWO-87587: [2.3] Fix Sort by Product Name #13468
- Merge Pull Request #13468 from ihor-sviziev/magento2:2.3-fix-sort-by-product-name - Merged commits: 1. 618b300
2 parents 699d7a1 + 618b300 commit 9dd6cdc

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)