Skip to content

Commit c4dfa5d

Browse files
committed
MC-15250: Explicit product sorting in PageBuilder Products Content type
1 parent e062e71 commit c4dfa5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/PageBuilder/Model/Catalog/Sorting/StockAbstract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function sort(
4444
return $collection;
4545
}
4646

47-
$baseSet = clone $collection;
47+
$baseSetIds = $collection->getAllIds();
4848
$finalSet = clone $collection;
4949
$collection->setCurPage(0);
5050

@@ -96,7 +96,7 @@ public function sort(
9696
$resultIds[] = $item->getId();
9797
}
9898

99-
$ids = array_unique(array_merge($resultIds, $baseSet->getAllIds()));
99+
$ids = array_unique(array_merge($resultIds, $baseSetIds));
100100

101101
$finalSet->getSelect()
102102
->reset(DB\Select::ORDER)

0 commit comments

Comments
 (0)