Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
quote_with_simple_product_and_custom_option.php File Reference

Go to the source code of this file.

Variables

 $productRepository
 
 $product = $productRepository->get('simple')
 
 $options = []
 
foreach($product->getOptions() as $option) $requestInfo = new \Magento\Framework\DataObject(['qty' => 1, 'options' => $options])
 
 $cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Checkout\Model\Cart::class)
 
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 

Variable Documentation

◆ $cart

$cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Checkout\Model\Cart::class)

◆ $objectManager

◆ $options

$options = []

◆ $product

$product = $productRepository->get('simple')

◆ $productRepository

$productRepository
Initial value:
->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)

Definition at line 10 of file quote_with_simple_product_and_custom_option.php.

◆ $requestInfo

foreach ( $product->getOptions() as $option) $requestInfo = new \Magento\Framework\DataObject(['qty' => 1, 'options' => $options])