Skip to content

Commit 07158a3

Browse files
committed
MC-15250: Explicit product sorting in PageBuilder Products Content type
1 parent be06029 commit 07158a3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function sort(
4646
$collection->joinAttribute('sorting_price', 'catalog_product/price', 'entity_id', null, 'left');
4747
$collection->getSelect()
4848
->reset(Select::ORDER)
49-
->order('sorting_price '.$this->sortDirection);
49+
->order('sorting_price '.$this->sortDirection)
50+
->order('entity_id');
5051

5152
return $collection;
5253
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public function sort(
9797
->group('entity_id')
9898
->having('final_qty > 0')
9999
->reset(DB\Select::ORDER)
100-
->order('final_qty '.$this->sortDirection);
100+
->order('final_qty '.$this->sortDirection)
101+
->order('entity_id');
101102

102103
$resultIds = [];
103104

0 commit comments

Comments
 (0)