Skip to content

Commit 7987d49

Browse files
committed
MCP-408: Fix incremental ID is refreshing when order processed by consumer
1 parent 96dc693 commit 7987d49

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,15 @@ protected function submitQuote(QuoteEntity $quote, $orderData = [])
553553
$order->setCustomerFirstname($quote->getCustomerFirstname());
554554
$order->setCustomerMiddlename($quote->getCustomerMiddlename());
555555
$order->setCustomerLastname($quote->getCustomerLastname());
556-
$order->setEntityId($quote->getOrigOrderId());
556+
557+
if ($quote->getOrigOrderId()) {
558+
$order->setEntityId($quote->getOrigOrderId());
559+
}
560+
561+
if ($quote->getReservedOrderId()) {
562+
$order->setIncrementId($quote->getReservedOrderId());
563+
}
564+
557565
$this->submitQuoteValidator->validateOrder($order);
558566

559567
$this->eventManager->dispatch(

0 commit comments

Comments
 (0)