Skip to content

Commit 618b300

Browse files
p-bystritskyihor-sviziev
authored andcommitted
#12860: Sort by Product Name doesn't work with Ancor and available filters.
(cherry picked from commit e5b030a)
1 parent 221e2a4 commit 618b300

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)