Skip to content

Commit 728e3b7

Browse files
committed
MC-36044: There are no 'Add Products By SKU' and 'Add Products' buttons on Create New Order page
1 parent 3b1573e commit 728e3b7

File tree

1 file changed

+17
-14
lines changed
  • app/code/Magento/Sales/view/adminhtml/web/order/create

1 file changed

+17
-14
lines changed

app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ define([
5656
}
5757
});
5858

59-
jQuery.async('#order-items .admin__page-section-title', (function () {
59+
jQuery.async('#order-items', (function () {
6060
this.dataArea = new OrderFormArea('data', $(this.getAreaId('data')), this);
6161
this.itemsArea = Object.extend(new OrderFormArea('items', $(this.getAreaId('items')), this), {
6262
addControlButton: function (button) {
@@ -84,20 +84,23 @@ define([
8484
}, 10);
8585
};
8686

87-
this.dataArea.onLoad = this.dataArea.onLoad.wrap(function (proceed) {
88-
proceed();
89-
this._parent.itemsArea.setNode($(this._parent.getAreaId('items')));
90-
this._parent.itemsArea.onLoad();
91-
});
87+
jQuery.async('#order-items .admin__page-section-title', (function () {
88+
this.dataArea.onLoad = this.dataArea.onLoad.wrap(function (proceed) {
89+
proceed();
90+
this._parent.itemsArea.setNode($(this._parent.getAreaId('items')));
91+
this._parent.itemsArea.onLoad();
92+
});
9293

93-
this.itemsArea.onLoad = this.itemsArea.onLoad.wrap(function (proceed) {
94-
proceed();
95-
if ($(searchAreaId) && !jQuery('#' + searchAreaId).is(':visible') && !$(searchButtonId)) {
96-
this.addControlButton(searchButton);
97-
}
98-
});
99-
this.areasLoaded();
100-
this.itemsArea.onLoad();
94+
this.itemsArea.onLoad = this.itemsArea.onLoad.wrap(function (proceed) {
95+
proceed();
96+
if ($(searchAreaId) && !jQuery('#' + searchAreaId).is(':visible') && !$(searchButtonId)) {
97+
this.addControlButton(searchButton);
98+
}
99+
});
100+
this.areasLoaded();
101+
this.itemsArea.onLoad();
102+
103+
}).bind(this));
101104

102105
}).bind(this));
103106

0 commit comments

Comments
 (0)