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

Go to the source code of this file.

Variables

 $productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)
 
 $product = $productRepository->get('bundle-product')
 
 $typeInstance = $product->getTypeInstance()
 
 $optionCollection = $typeInstance->getOptionsCollection($product)
 
 $selectionCollection = $typeInstance->getSelectionsCollection($typeInstance->getOptionsIds($product), $product)
 
 $bundleOptions = []
 
 $bundleOptionsQty = []
 
foreach($optionCollection as $option) $requestInfo
 
 $cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Checkout\Model\Cart::class)
 
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 

Variable Documentation

◆ $bundleOptions

$bundleOptions = []

Definition at line 21 of file quote_with_bundle_product.php.

◆ $bundleOptionsQty

$bundleOptionsQty = []

Definition at line 22 of file quote_with_bundle_product.php.

◆ $cart

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

Definition at line 36 of file quote_with_bundle_product.php.

◆ $objectManager

Definition at line 42 of file quote_with_bundle_product.php.

◆ $optionCollection

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

Definition at line 18 of file quote_with_bundle_product.php.

◆ $product

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

Definition at line 12 of file quote_with_bundle_product.php.

◆ $productRepository

$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)

Definition at line 10 of file quote_with_bundle_product.php.

◆ $requestInfo

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

Definition at line 31 of file quote_with_bundle_product.php.

◆ $selectionCollection

$selectionCollection = $typeInstance->getSelectionsCollection($typeInstance->getOptionsIds($product), $product)

Definition at line 19 of file quote_with_bundle_product.php.

◆ $typeInstance

$typeInstance = $product->getTypeInstance()

Definition at line 16 of file quote_with_bundle_product.php.