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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $productRepository = $objectManager->get(\Magento\Catalog\Model\ProductRepository::class)
 
 $product = $objectManager->create(\Magento\Catalog\Model\Product::class)
 
 $options
 
 $customOptions = []
 
 $customOptionFactory = $objectManager->create(\Magento\Catalog\Api\Data\ProductCustomOptionInterfaceFactory::class)
 
 $optionValueFactory
 

Variable Documentation

◆ $customOptionFactory

$customOptionFactory = $objectManager->create(\Magento\Catalog\Api\Data\ProductCustomOptionInterfaceFactory::class)

Definition at line 79 of file product_with_dropdown_option.php.

◆ $customOptions

$customOptions = []

Definition at line 76 of file product_with_dropdown_option.php.

◆ $objectManager

Definition at line 8 of file product_with_dropdown_option.php.

◆ $options

$options
Initial value:
= [
[
'title' => 'drop_down option',
'type' => 'drop_down',
'is_require' => true,
'sort_order' => 4,
'values' => [
[
'title' => 'drop_down option 1',
'price' => 10,
'price_type' => 'fixed',
'sku' => 'drop_down option 1 sku',
'sort_order' => 1,
],
[
'title' => 'drop_down option 2',
'price' => 20,
'price_type' => 'percent',
'sku' => 'drop_down option 2 sku',
'sort_order' => 2,
],
],
]
]

Definition at line 51 of file product_with_dropdown_option.php.

◆ $optionValueFactory

$optionValueFactory
Initial value:
= $objectManager->create(
\Magento\Catalog\Api\Data\ProductCustomOptionValuesInterfaceFactory::class
)

Definition at line 80 of file product_with_dropdown_option.php.

◆ $product

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

Definition at line 17 of file product_with_dropdown_option.php.

◆ $productRepository

$productRepository = $objectManager->get(\Magento\Catalog\Model\ProductRepository::class)

Definition at line 14 of file product_with_dropdown_option.php.