Skip to content

Commit 3784ee5

Browse files
committed
ACP2E-3255: [GRAPHQL] model value should be specified when getting customerCart
- Fixed the CR comments.
1 parent 96507bb commit 3784ee5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/code/Magento/Quote/Model/QuoteManagement.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -694,14 +694,14 @@ protected function _prepareCustomerQuote($quote)
694694
$hasDefaultBilling = true;
695695
}
696696
}
697-
//save here new customer address
698-
$shippingAddress->setCustomerId($quote->getCustomerId());
699697
if (!$shippingAddress->getId()) {
698+
//save here new customer address
699+
$shippingAddress->setCustomerId($quote->getCustomerId());
700700
$this->addressRepository->save($shippingAddress);
701+
$quote->addCustomerAddress($shippingAddress);
702+
$this->addressesToSync[] = $shippingAddress->getId();
701703
}
702-
$quote->addCustomerAddress($shippingAddress);
703704
$shipping->setCustomerAddressData($shippingAddress);
704-
$this->addressesToSync[] = $shippingAddress->getId();
705705
$shipping->setCustomerAddressId($shippingAddress->getId());
706706
}
707707
}
@@ -729,13 +729,13 @@ protected function _prepareCustomerQuote($quote)
729729
}
730730
$billingAddress->setIsDefaultBilling(true);
731731
}
732-
$billingAddress->setCustomerId($quote->getCustomerId());
733732
if (!$billingAddress->getId()) {
733+
$billingAddress->setCustomerId($quote->getCustomerId());
734734
$this->addressRepository->save($billingAddress);
735+
$quote->addCustomerAddress($billingAddress);
736+
$this->addressesToSync[] = $billingAddress->getId();
735737
}
736-
$quote->addCustomerAddress($billingAddress);
737738
$billing->setCustomerAddressData($billingAddress);
738-
$this->addressesToSync[] = $billingAddress->getId();
739739
$billing->setCustomerAddressId($billingAddress->getId());
740740

741741
// Admin order: `Same As Billing Address`- when new billing address saved in address book

0 commit comments

Comments
 (0)