title: Add a quote item with a info_buyRequest buy request
body: <p>I would like to get product price with options price using a custom module that calculates product price by formula, i like to use the function without adding the product to the cart.</p>
  
  <p>The function get a quote item paramter</p>
  
  <pre><code>public function getProductFinalPrice($item, $forReindex = false, $storeId = null)
  </code></pre>
  
  <p>So i thought about add a quote item with a info_buyRequest buy request
  I tried this </p>
  
  <pre><code>    $product = $this-&gt;_objectManager-&gt;create('Magento\Catalog\Model\Product')-&gt;load(5862);
      $customOptions = $this-&gt;_objectManager-&gt;get('Magento\Catalog\Model\Product\Option')-&gt;getProductOptionCollection($product);
      $item = $this-&gt;_objectManager-&gt;create('Magento\Quote\Model\Quote\Item');
  
      $options = $this-&gt;_objectManager-&gt;get('Magento\Quote\Model\ResourceModel\Quote\Item\Collection');
      $quote = $this-&gt;cart-&gt;getQuote();
      $quote-&gt;addProduct($product);
      $quote-&gt;save();
      $options-&gt;setQuote($quote);
      //$options-&gt;addItemFilter($item-&gt;getId());
      $item-&gt;setQuote($quote)-&gt;setProduct($product)-&gt;setQty($qty);
      foreach ($options as $option) {
          $item-&gt;addOption($option);
      }
      $infoBuyRequest = [
              "info_buyRequest" =&gt; [
                  "uenc" =&gt; "aHR0cHM6Ly93d3cud2V0YWcuY2EvZW5fY2EvbmFtZS10YWdzL25hbWUtdGFncy1pbnNwaXJhdGlvbi9jdXN0b20tbmFtZS10YWctb3JkZXIv",
                  "product" =&gt; 5862,
                  "qty" =&gt; $qty
              ]
          ];
  
      $option = $this-&gt;_objectManager-&gt;create(
          \Magento\Quote\Model\Quote\Item\Option::class,
          ['data' =&gt; $infoBuyRequest]
      );
  
      $item-&gt;addOption($option);
      $item-&gt;setProductOptions($infoBuyRequest);
      var_dump($this-&gt;_getBuyRequest($item));
  
  
    var_dump($this-&gt;_getBuyRequest($item)); return 
    object(Magento\Framework\DataObject)#3647 (1) {
    ["_data":protected]=&gt;
    array(2) {
      ["original_qty"]=&gt;
       NULL
      ["qty"]=&gt;
       int(100)
    }
   }
  </code></pre>
  
  <p>I like to get something with info_buyrequest</p>
  
  <pre><code>            [
              "info_buyRequest" =&gt; [
                  "uenc" =&gt; "aHR0cHM6Ly93d3cud2V0YWcuY2EvZW5fY2EvbmFtZS10YWdzL25hbWUtdGFncy1pbnNwaXJhdGlvbi9jdXN0b20tbmFtZS10YWctb3JkZXIv",
                  "product" =&gt; 5862,
                  "qty" =&gt; $qty
              ]
          ]
  </code></pre>
  
  <p>This is the function _getBuyRequest</p>
  
  <pre><code>public function _getBuyRequest($item) { 
      $option = $item-&gt;getOptionByCode('info_buyRequest');
      if ($option) {
          $value = json_decode($option-&gt;getValue(), true); //in M2.2 json used for the buy request
          if (is_null($value))
              $value = unserialize($option-&gt;getValue()); //in M&lt;2.2 the buy request is serialized
      } else
          $value = [];
  
      $buyRequest = new \Magento\Framework\DataObject($value);
  
      // Overwrite standard buy request qty, because item qty could have changed since adding to quote
      $buyRequest-&gt;setOriginalQty($buyRequest-&gt;getQty())
              -&gt;setQty($item-&gt;getQty() * 1);
  
      return $buyRequest;
  }
  </code></pre>
  
  <p>So how to add info_buyRequest? i would like to load options in the quote item.</p>