Skip to content

Commit 8261058

Browse files
committed
set customer contryid and vatid to address
1 parent c6cf182 commit 8261058

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/Quote/Observer/Frontend/Quote/Address/CollectTotalsObserver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
111111
if (empty($customerCountryCode) && empty($customerVatNumber) && $customer->getDefaultShipping()) {
112112
$customerAddress = $this->addressRepository->getById($customer->getDefaultShipping());
113113

114+
$address->setCountryId($customerAddress->getCountryId());
115+
$address->setVatId($customerAddress->getVatId());
114116
$customerCountryCode = $customerAddress->getCountryId();
115117
$customerVatNumber = $customerAddress->getVatId();
116118
}

0 commit comments

Comments
 (0)