File tree 1 file changed +10
-8
lines changed
app/code/Magento/Swatches/Controller/Adminhtml/Product/Attribute/Plugin
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,17 @@ class Save
24
24
public function beforeDispatch (Attribute \Save $ subject , RequestInterface $ request )
25
25
{
26
26
$ data = $ request ->getPostValue ();
27
- //Data is serialized to overcome issues caused by max_input_vars value if it's modification is unavailable.
28
- //See subject controller code and comments for more info.
29
- if (isset ($ data ['serialized_swatch_values ' ])
30
- && in_array ($ data ['frontend_input ' ], ['swatch_visual ' , 'swatch_text ' ])
31
- ) {
32
- $ data ['serialized_options ' ] = $ data ['serialized_swatch_values ' ];
33
- }
34
- unset($ data ['serialized_swatch_values ' ]);
27
+
35
28
if (isset ($ data ['frontend_input ' ])) {
29
+ //Data is serialized to overcome issues caused by max_input_vars value if it's modification is unavailable.
30
+ //See subject controller code and comments for more info.
31
+ if (isset ($ data ['serialized_swatch_values ' ])
32
+ && in_array ($ data ['frontend_input ' ], ['swatch_visual ' , 'swatch_text ' ])
33
+ ) {
34
+ $ data ['serialized_options ' ] = $ data ['serialized_swatch_values ' ];
35
+ unset($ data ['serialized_swatch_values ' ]);
36
+ }
37
+
36
38
switch ($ data ['frontend_input ' ]) {
37
39
case 'swatch_visual ' :
38
40
$ data [Swatch::SWATCH_INPUT_TYPE_KEY ] = Swatch::SWATCH_INPUT_TYPE_VISUAL ;
You can’t perform that action at this time.
0 commit comments