Skip to content

Commit 82ba844

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-57165' into 2.0-develop-pr6
2 parents 48439da + 93dd1cc commit 82ba844

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ define([
3030
listens: {
3131
'${ $.productsProvider }:data': '_showMessageAssociatedGrid _handleManualGridOpening',
3232
'${ $.productsMassAction }:selected': '_handleManualGridSelect',
33-
'${ $.configurableVariations }:productMatrix': '_showButtonAddManual _switchProductType'
33+
'${ $.configurableVariations }:productMatrix': '_switchProductType',
34+
'${ $.configurableVariations }:isShowAddProductButton': '_showButtonAddManual'
3435
}
3536
},
3637

@@ -65,7 +66,7 @@ define([
6566
this.productsModal.notification();
6667
}.bind(this));
6768
this.variationsComponent(function (variation) {
68-
this._showButtonAddManual(variation.productMatrix());
69+
this._showButtonAddManual(variation.attributes());
6970
}.bind(this));
7071

7172
this._initGrid = _.once(this._initGrid);
@@ -193,12 +194,12 @@ define([
193194

194195
/**
195196
* Show button add manual
196-
* @param {Array} variations
197+
* @param {Array} attributes
197198
* @returns {*}
198199
* @private
199200
*/
200-
_showButtonAddManual: function (variations) {
201-
return this.button(variations.length);
201+
_showButtonAddManual: function (attributes) {
202+
return this.button(attributes.length);
202203
},
203204

204205
_switchProductType: function (variations) {

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/variations.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ define([
3434
configurationsSerialized: ko.observable(''),
3535
variations: [],
3636
productAttributes: [],
37+
isShowAddProductButton: false,
3738
fullAttributes: [],
3839
rowIndexToEdit: false,
3940
productAttributesMap: null,
@@ -73,7 +74,7 @@ define([
7374
pageSize: ko.getObservable(this.paging, 'pageSize')
7475
};
7576

76-
this._super().observe('actions opened attributes productMatrix');
77+
this._super().observe('actions opened attributes productMatrix isShowAddProductButton');
7778
this.paging.totalRecords = this.variations.length;
7879

7980
_.each(pagingObservables, function (observable) {
@@ -447,6 +448,7 @@ define([
447448
}, this);
448449
this.productMatrix([]);
449450
this.productMatrix(tempMatrix);
451+
this.isShowAddProductButton(this.attributes());
450452
},
451453

452454
/**

app/code/Magento/Eav/Model/AttributeRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function getList($entityTypeCode, \Magento\Framework\Api\SearchCriteriaIn
103103
'main_table.entity_type_id = entity_type.entity_type_id',
104104
[]
105105
);
106-
$attributeCollection->join(
106+
$attributeCollection->getSelect()->joinLeft(
107107
['eav_entity_attribute' => $attributeCollection->getTable('eav_entity_attribute')],
108108
'main_table.attribute_id = eav_entity_attribute.attribute_id',
109109
[]

0 commit comments

Comments
 (0)