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 (OpenMage#2637)
  • Loading branch information
elidrissidev committed Feb 28, 2023
1 parent 5436b84 commit 4bf0314
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 4bf0314

Please sign in to comment.