Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
quote_with_simple_product_saved.php
Go to the documentation of this file.
1 <?php
7 require 'simple_product.php';
8 
11 $quote->setStoreId(1)
12  ->setIsActive(true)
13  ->setIsMultiShipping(false)
14  ->setReservedOrderId('test_order_with_simple_product_without_address')
15  ->setEmail('[email protected]')
16  ->addProduct($product->load($product->getId()), 1);
17 
18 $quote->collectTotals()->save();
19 
22  ->create(\Magento\Quote\Model\QuoteIdMaskFactory::class)
23  ->create();
24 $quoteIdMask->setQuoteId($quote->getId());
25 $quoteIdMask->setDataChanges(true);
26 $quoteIdMask->save();