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

Go to the source code of this file.

Variables

 $objectManager = Bootstrap::getObjectManager()
 
 $product = $objectManager->create(\Magento\Catalog\Model\Product::class)
 
 $typeInstance = $product->getTypeInstance()
 
 $optionCollection = $typeInstance->getOptionsCollection($product)
 
 $bundleOptions = []
 
 $bundleOptionsQty = []
 
foreach($optionCollection as $option) $requestInfo
 
 $cart = Bootstrap::getObjectManager()->create(\Magento\Checkout\Model\Cart::class)
 

Variable Documentation

◆ $bundleOptions

$bundleOptions = []

Definition at line 24 of file quote_with_bundle_and_options.php.

◆ $bundleOptionsQty

$bundleOptionsQty = []

Definition at line 25 of file quote_with_bundle_and_options.php.

◆ $cart

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

Definition at line 47 of file quote_with_bundle_and_options.php.

◆ $objectManager

$objectManager = Bootstrap::getObjectManager()

Definition at line 13 of file quote_with_bundle_and_options.php.

◆ $optionCollection

$optionCollection = $typeInstance->getOptionsCollection($product)

Definition at line 22 of file quote_with_bundle_and_options.php.

◆ $product

$product = $objectManager->create(\Magento\Catalog\Model\Product::class)

Definition at line 16 of file quote_with_bundle_and_options.php.

◆ $requestInfo

foreach ( $optionCollection as $option) $requestInfo
Initial value:
= new \Magento\Framework\DataObject(
[
'product' => $product->getId(),
'bundle_option' => $bundleOptions,
'bundle_option_qty' => $bundleOptionsQty,
'qty' => 1,
]
)

Definition at line 37 of file quote_with_bundle_and_options.php.

◆ $typeInstance

$typeInstance = $product->getTypeInstance()

Definition at line 20 of file quote_with_bundle_and_options.php.