Skip to content

Commit

Permalink
ENGCOM-3050: Fix category tree in cart price rule #17493 #18175
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Idolov authored Oct 9, 2018
2 parents 744344a + 7f8de39 commit ab24dbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ define([

categoryLoader.on('beforeload', function (treeLoader, node) {
treeLoader.baseParams.id = node.attributes.id;
treeLoader.baseParams.selected = options.jsFormObject.updateElement.value;
});

/* eslint-disable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ public function execute()
if (!($category = $this->_initCategory())) {
return;
}
$selected = $this->getRequest()->getPost('selected', '');
$block = $this->_view->getLayout()->createBlock(
\Magento\Catalog\Block\Adminhtml\Category\Checkboxes\Tree::class
)->setCategoryIds(
[$categoryId]
explode(',', $selected)
);
$this->getResponse()->representJson(
$block->getTreeJson($category)
Expand Down

0 comments on commit ab24dbe

Please sign in to comment.