Closed gihovani closed 4 years ago
I tested this in the frontend and it breaks the save process.
Quote in Magento has a weird problem with getItems
and getItemsCollections. I don't remember the details but I believe that products that were just added to the cart are not supposed to be in
getItems, otherwise
\Magento\Quote\Model\QuoteRepository\SaveHandler::save` will try to add them again.
Change $quote->getItems() to $quote->getItemsCollection()->getItems().