File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
app/code/Magento/PageBuilder/Controller/Adminhtml/Form/Element/ProductConditions Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -43,19 +43,25 @@ public function execute()
43
43
44
44
$ typeData = explode ('| ' , str_replace ('- ' , '/ ' , $ this ->getRequest ()->getParam ('type ' )));
45
45
$ className = $ typeData [0 ];
46
+ $ prefix = $ this ->getRequest ()->getParam ('prefix ' , 'conditions ' );
46
47
47
48
$ model = $ this ->_objectManager ->create ($ className )
48
49
->setId ($ id )
49
50
->setType ($ className )
50
51
->setRule ($ this ->rule )
51
- ->setPrefix ($ this -> getRequest ()-> getParam ( ' prefix ' , ' conditions ' ) );
52
+ ->setPrefix ($ prefix );
52
53
53
54
if (!empty ($ typeData [1 ])) {
54
55
$ model ->setAttribute ($ typeData [1 ]);
55
56
}
56
57
57
58
$ result = '' ;
58
59
if ($ model instanceof AbstractCondition) {
60
+ // set value of $prefix in model's data registry to value of 'conditions',
61
+ // as is required for correct use of \Magento\Rule\Model\Condition\Combine::getConditions
62
+ if ($ model ->getData ($ prefix ) === null ) {
63
+ $ model ->setData ($ prefix , $ model ->getData ('conditions ' ));
64
+ }
59
65
$ model ->setJsFormObject ($ jsObjectName );
60
66
$ model ->setFormName ($ formName );
61
67
$ result = $ model ->asHtmlRecursive ();
You can’t perform that action at this time.
0 commit comments