Skip to content

Commit 4076ecf

Browse files
committed
Merge remote-tracking branch 'origin/MC-28956' into 2.3-develop-pr38
2 parents 7b388de + e6ea90e commit 4076ecf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ public function setShippingMethods($methods)
625625
$addressId = $address->getId();
626626
if (isset($methods[$addressId])) {
627627
$address->setShippingMethod($methods[$addressId]);
628+
$address->setCollectShippingRates(true);
628629
} elseif (!$address->getShippingMethod()) {
629630
throw new \Magento\Framework\Exception\LocalizedException(
630631
__('Set shipping methods for all addresses. Verify the shipping methods and try again.')

app/code/Magento/Multishipping/Test/Unit/Model/Checkout/Type/MultishippingTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,16 @@ public function testSetShippingMethods()
420420
$methodsArray = [1 => 'flatrate_flatrate', 2 => 'tablerate_bestway'];
421421
$addressId = 1;
422422
$addressMock = $this->getMockBuilder(QuoteAddress::class)
423-
->setMethods(['getId', 'setShippingMethod'])
423+
->setMethods(['getId', 'setShippingMethod', 'setCollectShippingRates'])
424424
->disableOriginalConstructor()
425425
->getMock();
426426

427427
$addressMock->expects($this->once())->method('getId')->willReturn($addressId);
428428
$this->quoteMock->expects($this->once())->method('getAllShippingAddresses')->willReturn([$addressMock]);
429429
$addressMock->expects($this->once())->method('setShippingMethod')->with($methodsArray[$addressId]);
430+
$addressMock->expects($this->once())
431+
->method('setCollectShippingRates')
432+
->with(true);
430433
$this->quoteMock->expects($this->once())
431434
->method('__call')
432435
->with('setTotalsCollectedFlag', [false])

0 commit comments

Comments
 (0)