From fe74769a79c3964ded1d3aab79315a84e619a1c5 Mon Sep 17 00:00:00 2001 From: KrasnoshchokBohdan Date: Tue, 20 May 2025 18:18:44 +0300 Subject: [PATCH 1/2] magento/magento2#39915: Guest Prefix Not Saved to Quote Address 2.4.8 --- app/code/Magento/Quote/Model/CustomerManagement.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Quote/Model/CustomerManagement.php b/app/code/Magento/Quote/Model/CustomerManagement.php index d2b2bb58159bf..498741072341c 100644 --- a/app/code/Magento/Quote/Model/CustomerManagement.php +++ b/app/code/Magento/Quote/Model/CustomerManagement.php @@ -162,6 +162,7 @@ public function validateAddresses(QuoteEntity $quote) if (empty($addresses) && $quote->getCustomerIsGuest()) { $billingAddress = $quote->getBillingAddress(); $customerAddress = $this->customerAddressFactory->create(); + $customerAddress->setPrefix($billingAddress->getPrefix()); $customerAddress->setFirstname($billingAddress->getFirstname()); $customerAddress->setMiddlename($billingAddress?->getMiddlename()); $customerAddress->setLastname($billingAddress->getLastname()); From cb889474e2f6082d46bdb4d26f3f5e67d4fa6619 Mon Sep 17 00:00:00 2001 From: KrasnoshchokBohdan <111579196+KrasnoshchokBohdan@users.noreply.github.com> Date: Mon, 26 May 2025 11:44:30 +0300 Subject: [PATCH 2/2] Update app/code/Magento/Quote/Model/CustomerManagement.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/code/Magento/Quote/Model/CustomerManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Quote/Model/CustomerManagement.php b/app/code/Magento/Quote/Model/CustomerManagement.php index 498741072341c..00898fc6edec7 100644 --- a/app/code/Magento/Quote/Model/CustomerManagement.php +++ b/app/code/Magento/Quote/Model/CustomerManagement.php @@ -162,7 +162,7 @@ public function validateAddresses(QuoteEntity $quote) if (empty($addresses) && $quote->getCustomerIsGuest()) { $billingAddress = $quote->getBillingAddress(); $customerAddress = $this->customerAddressFactory->create(); - $customerAddress->setPrefix($billingAddress->getPrefix()); + $customerAddress->setPrefix($billingAddress?->getPrefix()); $customerAddress->setFirstname($billingAddress->getFirstname()); $customerAddress->setMiddlename($billingAddress?->getMiddlename()); $customerAddress->setLastname($billingAddress->getLastname());