Skip to content

Commit 5a87abc

Browse files
authored
Fixed sort by position with flat tables when category filter is not applied (#2637)
1 parent 40987a5 commit 5a87abc

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,9 +1525,6 @@ public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC)
15251525
$this->getSelect()->order($this->_getAttributeFieldName($attribute) . ' ' . $dir);
15261526
return $this;
15271527
}
1528-
if ($this->isEnabledFlat()) {
1529-
$this->getSelect()->order("cat_index_position {$dir}");
1530-
}
15311528
// optimize if using cat index
15321529
$filters = $this->_productLimitationFilters;
15331530
if (isset($filters['category_id']) || isset($filters['visibility'])) {

0 commit comments

Comments
 (0)