Skip to content

Commit 5ce73ab

Browse files
committed
Set correct discount package value for tablerate
1 parent b2e7753 commit 5ce73ab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,9 @@ public function collectRates(RateRequest $request)
140140
$freePackageValue += $item->getBaseRowTotal();
141141
}
142142
}
143-
$oldValue = $request->getPackageValue();
144-
$newPackageValue = $oldValue - $freePackageValue;
145-
$request->setPackageValue($newPackageValue);
146-
$request->setPackageValueWithDiscount($newPackageValue);
143+
144+
$request->setPackageValue($request->getPackageValue() - $freePackageValue);
145+
$request->setPackageValueWithDiscount($request->getPackageValueWithDiscount() - $freePackageValue);
147146
}
148147

149148
if (!$request->getConditionName()) {

0 commit comments

Comments
 (0)