Skip to content

Commit 12e4ec2

Browse files
authored
ENGCOM-4015: [Backport] #12194: Tier price on configurable product sorting so… #20642
2 parents c86a825 + 6635819 commit 12e4ec2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ private function getTierPriceSelect(array $productIds)
22052205
$this->getLinkField() . ' IN(?)',
22062206
$productIds
22072207
)->order(
2208-
$this->getLinkField()
2208+
'qty'
22092209
);
22102210
return $select;
22112211
}

app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/CollectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public function testAddTierPriceDataByGroupId()
318318
[ '(customer_group_id=? AND all_groups=0) OR all_groups=1', $customerGroupId]
319319
)
320320
->willReturnSelf();
321-
$select->expects($this->once())->method('order')->with('entity_id')->willReturnSelf();
321+
$select->expects($this->once())->method('order')->with('qty')->willReturnSelf();
322322
$this->connectionMock->expects($this->once())
323323
->method('fetchAll')
324324
->with($select)
@@ -370,7 +370,7 @@ public function testAddTierPriceData()
370370
$select->expects($this->exactly(1))->method('where')
371371
->with('entity_id IN(?)', [1])
372372
->willReturnSelf();
373-
$select->expects($this->once())->method('order')->with('entity_id')->willReturnSelf();
373+
$select->expects($this->once())->method('order')->with('qty')->willReturnSelf();
374374
$this->connectionMock->expects($this->once())
375375
->method('fetchAll')
376376
->with($select)

0 commit comments

Comments
 (0)