title: When adding new product programmatically to existing Cart in Magento 2, product price is 0
body: <p><strong>My goal:</strong></p>
  
  <pre><code>Magento 2.2.5
  </code></pre>
  
  <p>If the customer checked to [Add Shopping Bag] option then click [Proceed to Purchase], I'll add the [Shopping Bag] product to cart and redirect to confirm page.</p>
  
  <p><a href="https://i.stack.imgur.com/uvuve.png" rel="nofollow noreferrer">Cart page</a> 　→　<a href="https://i.stack.imgur.com/2oHhb.png" rel="nofollow noreferrer">Confirm page</a></p>
  
  <hr>
  
  <p><strong>Source Code:</strong></p>
  
  <pre><code>public function addShoppingBag()
  {
      $shoppingBagSku = $this-&gt;helper-&gt;getShoppingBagSku();
      $shoppingBagId = $this-&gt;productRepository-&gt;get($shoppingBagSku)-&gt;getId();
      $shoppingBagProduct = $this-&gt;productFactory-&gt;create()-&gt;load($shoppingBagId);
      $quote = $this-&gt;checkoutSession-&gt;getQuote();
      $params = array(
          'product' =&gt; $shoppingBagProduct-&gt;getId(),
          'qty' =&gt; 1,
          'price' =&gt; intval($shoppingBagProduct-&gt;getPrice())
      );
  
      $request = new \Magento\Framework\DataObject();
      $request-&gt;setData($params);
      $quote-&gt;addProduct($shoppingBagProduct, $request);
      $quote-&gt;getShippingAddress()-&gt;setCollectShippingRates(true);
      $this-&gt;quoteRepository-&gt;save($quote);
      $quote-&gt;collectTotals();
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Problem:</strong></p>
  
  <p>I checked <strong>quote_item</strong> table, product was added but all attributes related to price are 0.
  <strong>quote_address_item</strong> table is fine, all prices are correct. The problem is only with quote_item.</p>
  
  <hr>
  
  <p><strong>The things I tried</strong></p>
  
  <pre><code>$this-&gt;cart-&gt;addProduct($shoppingBagProduct, $request);
  $this-&gt;cart-&gt;save();
  $this-&gt;cart-&gt;getQuote()-&gt;setTotalsCollectedFlag(false)-&gt;collectTotals()-&gt;save();
  </code></pre>
  
  <p>The quote_item price will be updated, but it will redirect to Cart page again because of the following code:</p>
  
  <p>/magento2/source/vendor/magento/module-multishipping/Controller/Checkout.php</p>
  
  <pre><code>if ($this-&gt;_getCheckoutSession()-&gt;getCartWasUpdated(true)
      &amp;&amp;
      !in_array($action, ['index', 'login', 'register', 'addresses', 'success'])
  ) {
      $this-&gt;getResponse()-&gt;setRedirect($this-&gt;_getHelper()-&gt;getCartUrl());
      $this-&gt;_actionFlag-&gt;set('', self::FLAG_NO_DISPATCH, true);
      return parent::dispatch($request);
  }
  </code></pre>
  
  <p>When I try to:</p>
  
  <pre><code>setCartWasUpdated(false)
  </code></pre>
  
  <p>It redirects to Confirm page as I want, but the quote_item price is still 0.</p>
  
  <p>System > Configuration > Sales > Checkout >  After Adding a Product Redirect to Shopping Cart is set to No</p>
  
  <hr>
  
  <p><strong>Question:</strong></p>
  
  <p>I searched a lot the same problem in google but no luck to archive my goal.
  May be I'm missing something here, any suggestion will be appreciated.
  Thank you for reading my problem.</p>