File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed
Controller/Adminhtml/Product/Attribute
ConfigurableProduct/Test/Mftf/Section Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,15 @@ public function execute()
272272 unset($ data ['reset_is-default_option ' ]);
273273 $ data ['default_value ' ] = null ;
274274 } elseif (isset ($ data ['default ' ])) {
275- $ data ['default_value ' ] = implode (", " , $ data ['default ' ]);
275+ $ defaultOptions = [];
276+ foreach ($ data ['default ' ] as $ defaultValue ) {
277+ if (intval ($ defaultValue ) > 0 ) {
278+ $ defaultOptions [] = $ defaultValue ;
279+ }
280+ }
281+ if (!empty ($ defaultOptions )) {
282+ $ data ['default_value ' ] = implode (", " , $ defaultOptions );
283+ }
276284 }
277285
278286 $ model ->addData ($ data );
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!--
3- /**
4- * Copyright © Magento, Inc. All rights reserved.
5- * See COPYING.txt for license details .
6- */
3+ /**
4+ * Copyright 2019 Adobe
5+ * All Rights Reserved .
6+ */
77-->
88
99<sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1919 <element name =" secondOptionStoreView" type =" input" selector =" //td[@class='col-option_1'][3]/input" />
2020 <element name =" customStoreViewField" type =" input" selector =" input[value='{{fieldValue}}']" parameterized =" true" />
2121 <element name =" adminOption" type =" input" selector =" //input[contains(@name,'option[value][option_{{row}}][0]')]" parameterized =" true" />
22- <element name =" defaultRadioButton" type =" radio" selector =" //tr[{{row}}]//input[contains(@name,'default[] ')]" parameterized =" true" />
22+ <element name =" defaultRadioButton" type =" radio" selector =" //tr[{{row}}]//input[contains(@name,'default[')]" parameterized =" true" />
2323 <element name =" isRequired" type =" checkbox" selector =" //input[contains(@name,'is_required')]/..//label" />
2424 <element name =" advancedAttributeProperties" type =" text" selector =" //div[contains(@data-index,'advanced_fieldset')]" />
2525 <element name =" attributeCode" type =" input" selector =" //*[@class='admin__fieldset-wrapper-content admin__collapsible-content _show']//input[@name='attribute_code']" />
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!--
3- /**
4- * Copyright © Magento, Inc. All rights reserved.
5- * See COPYING.txt for license details .
6- */
3+ /**
4+ * Copyright 2018 Adobe
5+ * All Rights Reserved .
6+ */
77-->
88
99<sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
You can’t perform that action at this time.
0 commit comments