Skip to content

Commit cc3a54d

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

File tree

1 file changed

+15
-16
lines changed
  • app/code/Magento/Sales/view/adminhtml/web/order/create

1 file changed

+15
-16
lines changed

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

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

59-
jQuery.async('#order-items', (function () {
59+
jQuery.async('#order-items .admin__page-section-title', (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,22 +84,21 @@ define([
8484
}, 10);
8585
};
8686

87-
if (jQuery('#' + this.getAreaId('items')).ready()) {
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-
});
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+
});
92+
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();
93101

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-
}
103102
}).bind(this));
104103

105104
jQuery('#edit_form')

0 commit comments

Comments
 (0)