From 4fe7c46c5912e9c3ea87dba7dc1b1ec263e4621d Mon Sep 17 00:00:00 2001 From: Claire Kolln Date: Fri, 1 Nov 2024 15:48:33 -0400 Subject: [PATCH] adds handling for null customer id --- Observer/SalesQuoteSaveAfter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Observer/SalesQuoteSaveAfter.php b/Observer/SalesQuoteSaveAfter.php index 192212c..a480118 100644 --- a/Observer/SalesQuoteSaveAfter.php +++ b/Observer/SalesQuoteSaveAfter.php @@ -134,7 +134,7 @@ public function execute(Observer $observer) */ private function checkCustomerAndReturnEncodedId($quote) { - if ($this->_customerSession->isLoggedIn()) { + if ($this->_customerSession->isLoggedIn() && $quote->getCustomer()->getId()) { $customerId = $quote->getCustomer()->getId(); return base64_encode($customerId); } else {