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

Go to the source code of this file.

Variables

 $productRepository = Bootstrap::getObjectManager()->create(ProductRepositoryInterface::class)
 
 $product = $productRepository->get('configurable')
 
 $options
 
 $option = $options->setAttributeFilter($attribute->getId())->getFirstItem()
 
 $requestInfo
 
 $cart = Bootstrap::getObjectManager()->create(\Magento\Checkout\Model\Cart::class)
 
 $objectManager = Bootstrap::getObjectManager()
 

Variable Documentation

◆ $cart

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

Definition at line 35 of file quote_with_configurable_product.php.

◆ $objectManager

$objectManager = Bootstrap::getObjectManager()

Definition at line 41 of file quote_with_configurable_product.php.

◆ $option

$option = $options->setAttributeFilter($attribute->getId())->getFirstItem()

Definition at line 21 of file quote_with_configurable_product.php.

◆ $options

$options
Initial value:
= Bootstrap::getObjectManager()->create(
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\Collection::class
)

Definition at line 18 of file quote_with_configurable_product.php.

◆ $product

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

Definition at line 15 of file quote_with_configurable_product.php.

◆ $productRepository

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

Definition at line 14 of file quote_with_configurable_product.php.

◆ $requestInfo

$requestInfo
Initial value:
= new \Magento\Framework\DataObject(
[
'product' => 1,
'selected_configurable_option' => 1,
'qty' => 1,
'super_attribute' => [
$attribute->getId() => $option->getId()
]
]
)

Definition at line 23 of file quote_with_configurable_product.php.