Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
empty_quote.php
Go to the documentation of this file.
1 <?php
9 $quote = $objectManager->create(\Magento\Quote\Model\Quote::class);
10 $quote->setStoreId(1)
11  ->setIsActive(true)
12  ->setIsMultiShipping(false)
13  ->setReservedOrderId('reserved_order_id')
14  ->collectTotals()
15  ->save();
16 
19  ->create(\Magento\Quote\Model\QuoteIdMaskFactory::class)
20  ->create();
21 $quoteIdMask->setQuoteId($quote->getId());
22 $quoteIdMask->setDataChanges(true);
23 $quoteIdMask->save();
$quote
Definition: empty_quote.php:9
$objectManager
Definition: empty_quote.php:7
$quoteIdMask
Definition: empty_quote.php:18