Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
product_options.php
Go to the documentation of this file.
1 <?php
7 return [
8  [
9  'title' => 'test_option_code_1',
10  'type' => 'field',
11  'sort_order' => 1,
12  'is_require' => 1,
13  'price' => -10,
14  'price_type' => 'fixed',
15  'sku' => 'sku1',
16  'max_characters' => 10,
17  ],
18  [
19  'title' => 'area option',
20  'type' => 'area',
21  'sort_order' => 2,
22  'is_require' => 0,
23  'price' => 20,
24  'price_type' => 'percent',
25  'sku' => 'sku2',
26  'max_characters' => 20,
27  ],
28  [
29  'title' => 'file option',
30  'type' => 'file',
31  'sort_order' => 3,
32  'is_require' => 1,
33  'price' => 30,
34  'price_type' => 'percent',
35  'sku' => 'sku3',
36  'file_extension' => 'jpg, png, gif',
37  'image_size_x' => 10,
38  'image_size_y' => 20,
39  ],
40  [
41  'title' => 'drop_down option',
42  'type' => 'drop_down',
43  'sort_order' => 4,
44  'is_require' => 1,
45  'values' => [
46  [
47  'title' => 'drop_down option 1',
48  'sort_order' => 1,
49  'price' => 10,
50  'price_type' => 'fixed',
51  'sku' => 'drop_down option 1 sku',
52 
53  ],
54  [
55  'title' => 'drop_down option 2',
56  'sort_order' => 2,
57  'price' => 20,
58  'price_type' => 'fixed',
59  'sku' => 'drop_down option 2 sku'
60  ],
61  ],
62  ],
63  [
64  'title' => 'radio option',
65  'type' => 'radio',
66  'sort_order' => 5,
67  'is_require' => 1,
68  'values' => [
69  [
70  'title' => 'radio option 1',
71  'sort_order' => 1,
72  'price' => 10,
73  'price_type' => 'fixed',
74  'sku' => 'radio option 1 sku',
75  ],
76  [
77  'title' => 'radio option 2',
78  'sort_order' => 2,
79  'price' => 20,
80  'price_type' => 'fixed',
81  'sku' => 'radio option 2 sku',
82  ],
83  ],
84  ],
85  [
86  'title' => 'checkbox option',
87  'type' => 'checkbox',
88  'sort_order' => 6,
89  'is_require' => 1,
90  'values' => [
91  [
92  'title' => 'checkbox option 1',
93  'sort_order' => 1,
94  'price' => 10,
95  'price_type' => 'fixed',
96  'sku' => 'checkbox option 1 sku',
97  ],
98  [
99  'title' => 'checkbox option 2',
100  'sort_order' => 2,
101  'price' => 20,
102  'price_type' => 'fixed',
103  'sku' => 'checkbox option 2 sku'
104  ],
105  ],
106  ],
107  [
108  'title' => 'multiple option',
109  'type' => 'multiple',
110  'sort_order' => 7,
111  'is_require' => 1,
112  'values' => [
113  [
114  'title' => 'multiple option 1',
115  'sort_order' => 1,
116  'price' => 10,
117  'price_type' => 'fixed',
118  'sku' => 'multiple option 1 sku',
119  ],
120  [
121  'title' => 'multiple option 2',
122  'sort_order' => 2,
123  'price' => 20,
124  'price_type' => 'fixed',
125  'sku' => 'multiple option 2 sku'
126  ],
127  ],
128  ],
129  [
130  'title' => 'date option',
131  'type' => 'date',
132  'is_require' => 1,
133  'sort_order' => 8,
134  'price' => 80.0,
135  'price_type' => 'fixed',
136  'sku' => 'date option sku',
137  ],
138  [
139  'title' => 'date_time option',
140  'type' => 'date_time',
141  'is_require' => 1,
142  'sort_order' => 9,
143  'price' => 90.0,
144  'price_type' => 'fixed',
145  'sku' => 'date_time option sku',
146  ],
147  [
148  'title' => 'time option',
149  'type' => 'time',
150  'is_require' => 1,
151  'sort_order' => 10,
152  'price' => 100.0,
153  'price_type' => 'fixed',
154  'sku' => 'time option sku',
155  ],
156 ];