Skip to content

Commit 8ccd26d

Browse files
committed
commit
1 parent 25fe3b7 commit 8ccd26d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/base/controllers/Frontend/Commerce/Checkout/Shipping.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,11 @@ protected function addShippingMethodsAccordion(FAPI\Form $form, array &$form_sta
260260
$checkAddress = $this->getCart()->getShippingAddress();
261261
}
262262

263-
if ($checkAddress) {
263+
// set cart shipping address with "temporary" data in order to get methods informations
264+
$this->getCart()->setShippingAddress($checkAddress);
264265

265-
if (!$this->getCart()->getShippingAddress()) {
266-
// set cart shipping address with "temporary" data in order to get methods informations
267-
$this->getCart()->setShippingAddress($checkAddress);
268-
}
269266

267+
if ($checkAddress) {
270268
$methodsWithCost = array_map(function(ShippingMethodInterface $shippingMethod) {
271269
return [
272270
'cost' => $shippingMethod->evaluateShippingCosts($this->getCart()->getShippingAddress() ?? App::getInstance()->containerMake(Address::class), $this->getCart()),

0 commit comments

Comments
 (0)