File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ $scriptString .= <<<script
7777 dataUrl: ' {$ block ->escapeJs ($ block ->escapeUrl ($ block ->getLoadTreeUrl ()))}'
7878 });
7979
80+ categoryLoader.processResponse = function (response, parent, callback) {
81+ var config = JSON.parse(response.responseText);
82+
83+ this.buildCategoryTree(parent, config);
84+
85+ if (typeof callback == "function") {
86+ callback(this, parent);
87+ }
88+ };
89+
8090 categoryLoader.buildCategoryTree = function(parent, config)
8191 {
8292 if (!config) return null;
@@ -164,8 +174,10 @@ $scriptString .= <<<script
164174 };
165175
166176 categoryLoader.on("beforeload", function(treeLoader, node) {
167- $(' {$ block ->escapeJs ($ _divId )}').fire('category:beforeLoad', {treeLoader:treeLoader});
168177 treeLoader.baseParams.id = node.attributes.id;
178+ treeLoader.baseParams.store = node.attributes.store;
179+ treeLoader.baseParams.form_key = FORM_KEY;
180+ $(' {$ block ->escapeJs ($ _divId )}').fire('category:beforeLoad', {treeLoader:treeLoader});
169181 });
170182
171183 tree {$ block ->escapeJs ($ block ->getId ())} = new Ext.tree.TreePanel.Enhanced(' {$ block ->escapeJs ($ _divId )}', {
You can’t perform that action at this time.
0 commit comments