Skip to content

Commit ca11b5d

Browse files
committed
MAGETWO-87013: Cart Price Rules - Category Drill Down problems
1 parent b1ac6c3 commit ca11b5d

File tree

2 files changed

+26
-0
lines changed
  • app/code/Magento

2 files changed

+26
-0
lines changed

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ jQuery(function()
7676
dataUrl: '<?= /* @escapeNotVerified */ $block->getLoadTreeUrl() ?>'
7777
});
7878

79+
categoryLoader.processResponse = function (response, parent, callback) {
80+
var config = JSON.parse(response.responseText);
81+
82+
this.buildCategoryTree(parent, config);
83+
84+
if (typeof callback == "function") {
85+
callback(this, parent);
86+
}
87+
};
88+
7989
categoryLoader.createNode = function(config) {
8090
config.uiProvider = Ext.tree.CheckboxNodeUI;
8191
var node;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\SalesRule\Controller\Adminhtml\Promo\Widget;
7+
8+
class CategoriesJson extends \Magento\CatalogRule\Controller\Adminhtml\Promo\Widget\CategoriesJson
9+
{
10+
/**
11+
* Authorization level of a basic admin session
12+
*
13+
* @see _isAllowed()
14+
*/
15+
const ADMIN_RESOURCE = 'Magento_SalesRule::quote';
16+
}

0 commit comments

Comments
 (0)