Skip to content

Commit 0cd802b

Browse files
authored
Calculate Accurate Shipping Cost
Related to commit #5327ddc4b706de9dc573194acf3481dfc8e33cb5 (5327ddc) The shipping cost wasn't accurate when a shipment contained multiple packages as only the prices from the different packages were compiled, while the cost remained the one returned for a first package. (One request mode)
1 parent 81340cb commit 0cd802b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/code/Magento/Shipping/Model/Rate/Result.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ public function updateRatePrice($packageCount)
224224
if ($packageCount > 1) {
225225
foreach ($this->_rates as $rate) {
226226
$rate->setPrice($rate->getPrice() * $packageCount);
227+
$rate->setCost($rate->getCost() * $packageCount);
227228
}
228229
}
229230

0 commit comments

Comments
 (0)