Skip to content

Commit

Permalink
Fixed sort by position with flat tables when category filter is not a…
Browse files Browse the repository at this point in the history
…pplied (#2637)
  • Loading branch information
elidrissidev authored Feb 16, 2023
1 parent 40987a5 commit 5a87abc
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1525,9 +1525,6 @@ public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC)
$this->getSelect()->order($this->_getAttributeFieldName($attribute) . ' ' . $dir);
return $this;
}
if ($this->isEnabledFlat()) {
$this->getSelect()->order("cat_index_position {$dir}");
}
// optimize if using cat index
$filters = $this->_productLimitationFilters;
if (isset($filters['category_id']) || isset($filters['visibility'])) {
Expand Down

0 comments on commit 5a87abc

Please sign in to comment.