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

Go to the source code of this file.

Variables

 $productRepository
 
 $product = $productRepository->get('simple_with_custom_options')
 
 $options = []
 
foreach($product->getOptions() as $option) $requestInfo = new DataObject(['qty' => 1, 'options' => $options])
 
 $quote = Bootstrap::getObjectManager()->create(Quote::class)
 
 $objectManager = Bootstrap::getObjectManager()
 

Variable Documentation

◆ $objectManager

$objectManager = Bootstrap::getObjectManager()

◆ $options

$options = []

◆ $product

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

◆ $productRepository

$productRepository
Initial value:
= Bootstrap::getObjectManager()
->create(ProductRepositoryInterface::class)

Definition at line 19 of file cart_with_simple_product_and_custom_options.php.

◆ $quote

$quote = Bootstrap::getObjectManager()->create(Quote::class)

◆ $requestInfo

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