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

Go to the source code of this file.

Variables

 $objectManager = Bootstrap::getObjectManager()
 
 $installer = $objectManager->create(CategorySetup::class)
 
 $productRepository = $objectManager->get(ProductRepositoryInterface::class)
 
 $attributeSetId = $installer->getAttributeSetId('catalog_product', 'Default')
 
 $options = $attribute->getOptions()
 
 $attributeValues = []
 
 $associatedProductIds = []
 
 $productIds = [10, 20]
 
 $product = $objectManager->create(Product::class)
 
 $optionsFactory = $objectManager->create(Factory::class)
 
 $configurableAttributesData
 
 $configurableOptions = $optionsFactory->create($configurableAttributesData)
 
 $extensionConfigurableAttributes = $product->getExtensionAttributes()
 

Variable Documentation

◆ $associatedProductIds

$associatedProductIds = []

Definition at line 37 of file configurable_products.php.

◆ $attributeSetId

$attributeSetId = $installer->getAttributeSetId('catalog_product', 'Default')

Definition at line 30 of file configurable_products.php.

◆ $attributeValues

$attributeValues = []

Definition at line 35 of file configurable_products.php.

◆ $configurableAttributesData

$configurableAttributesData
Initial value:
= [
[
'attribute_id' => $attribute->getId(),
'code' => $attribute->getAttributeCode(),
'label' => $attribute->getStoreLabel(),
'position' => '0',
'values' => $attributeValues,
],
]

Definition at line 79 of file configurable_products.php.

◆ $configurableOptions

$configurableOptions = $optionsFactory->create($configurableAttributesData)

Definition at line 88 of file configurable_products.php.

◆ $extensionConfigurableAttributes

$extensionConfigurableAttributes = $product->getExtensionAttributes()

Definition at line 89 of file configurable_products.php.

◆ $installer

$installer = $objectManager->create(CategorySetup::class)

Definition at line 25 of file configurable_products.php.

◆ $objectManager

$objectManager = Bootstrap::getObjectManager()

Definition at line 22 of file configurable_products.php.

◆ $options

$options = $attribute->getOptions()

Definition at line 33 of file configurable_products.php.

◆ $optionsFactory

$optionsFactory = $objectManager->create(Factory::class)

Definition at line 78 of file configurable_products.php.

◆ $product

$product = $objectManager->create(Product::class)

Definition at line 76 of file configurable_products.php.

◆ $productIds

$productIds = [10, 20]

Definition at line 38 of file configurable_products.php.

◆ $productRepository

$productRepository = $objectManager->get(ProductRepositoryInterface::class)

Definition at line 28 of file configurable_products.php.