We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62ef409 commit 3929bf2Copy full SHA for 3929bf2
app/code/Magento/Quote/Model/QuoteManagement.php
@@ -236,8 +236,15 @@ protected function createCustomerCart($storeId)
236
public function placeOrder($cartId)
237
{
238
$quote = $this->quoteRepository->getActive($cartId);
239
- $order = $this->submit($quote);
240
- return $order->getId();
+
+ if ($quote->getCheckoutMethod() == \Magento\Checkout\Model\Type\Onepage::METHOD_GUEST) {
241
+ $quote->setCustomerId(null);
242
+ $quote->setCustomerEmail($quote->getBillingAddress()->getEmail());
243
+ $quote->setCustomerIsGuest(true);
244
+ $quote->setCustomerGroupId(\Magento\Customer\Api\Data\GroupInterface::NOT_LOGGED_IN_ID);
245
+ }
246
247
+ return $this->submit($quote)->getId();
248
}
249
250
/**
0 commit comments