Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
quote_with_two_products_and_customer.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
10 require __DIR__ . '/../../Checkout/_files/quote_with_address.php';
11 
13 $quote->addProduct(
15  1
16 );
17 
18 $quote->getPayment()->setMethod('payflowpro');
19 $quote->setIsMultiShipping('0');
20 $quote->getShippingAddress()->setShippingMethod('freeshipping_freeshipping');
21 $quote->setReservedOrderId('test01');
22 $quote->collectTotals()
23  ->save();
24 
26 $quoteIdMask = Bootstrap::getObjectManager()
27  ->create(\Magento\Quote\Model\QuoteIdMaskFactory::class)
28  ->create();
29 $quoteIdMask->setQuoteId($quote->getId());
30 $quoteIdMask->setDataChanges(true);
31 $quoteIdMask->save();
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
$quote
$customDesignProduct
Definition: products.php:27