Skip to content

Commit

Permalink
Collect shipping rates by address from quote
Browse files Browse the repository at this point in the history
  • Loading branch information
vicgeralds committed Jul 14, 2021
1 parent 09c8268 commit ce41e4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Model/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ public function initCheckout($reloadIfCurrencyChanged = true, $reloadIfCountryCh
// Set shipping method. It's required!
$selectedShippingMethod = $this->checkAndChangeShippingMethod();

// Needed to calculate table rates
$shippingAddress->setCollectShippingRates(true);

try {
$quote->setTotalsCollectedFlag(false)->collectTotals()->save(); //REQUIRED (maybe shipping amount was changed)
} catch (\Exception $e) {
Expand Down

0 comments on commit ce41e4f

Please sign in to comment.