18 require
__DIR__ .
'/configurable_attribute.php';
22 ->get(ProductRepositoryInterface::class);
25 $installer = Bootstrap::getObjectManager()->create(CategorySetup::class);
39 $product = Bootstrap::getObjectManager()->create(Product::class);
41 $product->setTypeId(Type::TYPE_SIMPLE)
50 ->setTestConfigurable(
$option->getValue())
51 ->setVisibility(Visibility::VISIBILITY_NOT_VISIBLE)
52 ->setStatus(Status::STATUS_ENABLED)
53 ->setStockData([
'use_config_manage_stock' => 1,
'qty' => 100,
'is_qty_decimal' => 0,
'is_in_stock' => 1]);
59 'value_index' =>
$option->getValue(),
65 $product = Bootstrap::getObjectManager()->create(Product::class);
83 $product->setTypeId(Configurable::TYPE_CODE)
87 ->setName(
'Configurable Product')
88 ->setSku(
'configurable')
89 ->setVisibility(Visibility::VISIBILITY_BOTH)
90 ->setStatus(Status::STATUS_ENABLED)
91 ->setStockData([
'use_config_manage_stock' => 1,
'is_in_stock' => 1]);
107 $product = Bootstrap::getObjectManager()->create(Product::class);
109 $product->setTypeId(Type::TYPE_SIMPLE)
118 ->setTestConfigurable(
$option->getValue())
119 ->setVisibility(Visibility::VISIBILITY_NOT_VISIBLE)
120 ->setStatus(Status::STATUS_ENABLED)
121 ->setStockData([
'use_config_manage_stock' => 1,
'qty' => 100,
'is_qty_decimal' => 0,
'is_in_stock' => 1]);
127 'value_index' =>
$option->getValue(),
133 $product = Bootstrap::getObjectManager()->create(Product::class);
136 $optionsFactory = Bootstrap::getObjectManager()->create(Factory::class);
156 $product->setTypeId(Configurable::TYPE_CODE)
160 ->setName(
'Configurable Product 12345')
161 ->setSku(
'configurable_12345')
162 ->setVisibility(Visibility::VISIBILITY_BOTH)
163 ->setStatus(Status::STATUS_ENABLED)
164 ->setStockData([
'use_config_manage_stock' => 1,
'is_in_stock' => 1]);
173 ->setAttributeSetId(4)
174 ->setName(
'Simple Product1')
176 ->setTaxClassId(
'none')
177 ->setDescription(
'description')
178 ->setShortDescription(
'short description')
179 ->setOptionsContainer(
'container1')
183 ->setMetaTitle(
'meta title')
184 ->setMetaKeyword(
'meta keyword')
185 ->setMetaDescription(
'meta description')
186 ->setVisibility(\
Magento\Catalog\Model\
Product\Visibility::VISIBILITY_BOTH)
190 ->setStockData([
'use_config_manage_stock' => 1,
'qty' => 100,
'is_qty_decimal' => 0,
'is_in_stock' => 1])
191 ->setSpecialPrice(
'5.99')
198 ->setAttributeSetId(4)
199 ->setName(
'Simple Product2')
201 ->setTaxClassId(
'none')
202 ->setDescription(
'description')
203 ->setShortDescription(
'short description')
204 ->setOptionsContainer(
'container1')
208 ->setMetaTitle(
'meta title')
209 ->setMetaKeyword(
'meta keyword')
210 ->setMetaDescription(
'meta description')
211 ->setVisibility(\
Magento\Catalog\Model\
Product\Visibility::VISIBILITY_IN_CATALOG)
215 ->setStockData([
'use_config_manage_stock' => 1,
'qty' => 50,
'is_qty_decimal' => 0,
'is_in_stock' => 1])
216 ->setSpecialPrice(
'15.99')
223 ->setAttributeSetId(4)
224 ->setName(
'Simple Product3')
226 ->setTaxClassId(
'none')
227 ->setDescription(
'description')
228 ->setShortDescription(
'short description')
231 ->setVisibility(\
Magento\Catalog\Model\
Product\Visibility::VISIBILITY_IN_CATALOG)
235 ->setStockData([
'use_config_manage_stock' => 1,
'qty' => 140,
'is_qty_decimal' => 0,
'is_in_stock' => 1])
236 ->setSpecialPrice(
'25.99')
defined('TESTS_BP')||define('TESTS_BP' __DIR__
$configurableAttributesData
$extensionConfigurableAttributes
static getObjectManager()