25 ->setAttributeSetId(4)
27 ->setName(
'Simple Product')
31 ->setShortDescription(
"Short description")
37 'cust_group' => \
Magento\Customer\Model\Group::CUST_GROUP_ALL,
43 'cust_group' => \
Magento\Customer\Model\Group::CUST_GROUP_ALL,
49 'cust_group' => \
Magento\Customer\Model\Group::NOT_LOGGED_IN_ID,
55 ->setDescription(
'Description with <b>html tag</b>')
56 ->setMetaTitle(
'meta title')
57 ->setMetaKeyword(
'meta keyword')
58 ->setMetaDescription(
'meta description')
59 ->setVisibility(\
Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
60 ->setStatus(\
Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
63 'use_config_manage_stock' => 1,
65 'is_qty_decimal' => 0,
68 )->setCanSaveCustomOptions(
true)
69 ->setHasOptions(
true);
73 'previous_group' =>
'text',
74 'title' =>
'Test Field',
79 'price_type' =>
'fixed',
81 'max_characters' => 100,
84 'previous_group' =>
'date',
85 'title' =>
'Test Date and Time',
86 'type' =>
'date_time',
90 'price_type' =>
'fixed',
94 'previous_group' =>
'select',
95 'title' =>
'Test Select',
96 'type' =>
'drop_down',
101 'option_type_id' =>
null,
102 'title' =>
'Option 1',
104 'price_type' =>
'fixed',
105 'sku' =>
'3-1-select',
108 'option_type_id' =>
null,
109 'title' =>
'Option 2',
111 'price_type' =>
'fixed',
112 'sku' =>
'3-2-select',
117 'previous_group' =>
'select',
118 'title' =>
'Test Radio',
124 'option_type_id' =>
null,
125 'title' =>
'Option 1',
127 'price_type' =>
'fixed',
128 'sku' =>
'4-1-radio',
131 'option_type_id' =>
null,
132 'title' =>
'Option 2',
134 'price_type' =>
'fixed',
135 'sku' =>
'4-2-radio',
$productRepositoryFactory
static getObjectManager()