Skip to content

Commit d54ed77

Browse files
committed
ACP2E-209: "Table rate" shipping method displays as "Not yet calculated" on checkout
Code fixed as per CR comments and discussion. Static test failures fixed.
1 parent a0efa2a commit d54ed77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ public function collectRates(RateRequest $request)
133133
$freeQty += $item->getQty() * ($child->getQty() - $freeShipping);
134134
}
135135
}
136-
} elseif (
137-
($item->getFreeShipping() || $item->getAddress()->getFreeShipping()) &&
136+
} elseif (($item->getFreeShipping() || $item->getAddress()->getFreeShipping()) &&
138137
($item->getFreeShippingMethod() == null || $item->getFreeShippingMethod() &&
139138
$item->getFreeShippingMethod() == 'tablerate_bestway')
140139
) {
@@ -194,7 +193,7 @@ public function collectRates(RateRequest $request)
194193
* Free package weight has been already taken into account.
195194
*/
196195
$request->setPackageValue($freePackageValue);
197-
$request->setPackageValueWithDiscount($freePackageValue - $request->getPackageValueWithDiscount());
196+
$request->setPackageValueWithDiscount($freePackageValue);
198197
$request->setPackageQty($freeQty);
199198
$rate = $this->getRate($request);
200199
if (!empty($rate) && $rate['price'] >= 0) {

0 commit comments

Comments
 (0)