Skip to content

Commit 5b53c48

Browse files
author
Maksym Aposov
committed
MAGETWO-44774: Configurable product type switching fails
1 parent f578e54 commit 5b53c48

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

app/code/Magento/ConfigurableProduct/Setup/InstallData.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
4747
'minimal_price',
4848
'msrp',
4949
'msrp_display_actual_price_type',
50+
'price',
5051
'special_price',
5152
'special_from_date',
5253
'special_to_date',

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ define([
159159
this.attributes(attributes);
160160
this.initImageUpload();
161161
this.disableConfigurableAttributes(attributes);
162+
this.showPrice();
162163
},
163164
changeButtonWizard: function () {
164165
var $button = $('[data-action=open-steps-wizard] [data-role=button-label]');
@@ -212,6 +213,7 @@ define([
212213
$('[data-attribute-code="' + attribute.code + '"] select').removeProp('disabled');
213214
});
214215
}
216+
this.showPrice();
215217
},
216218
toggleProduct: function (rowIndex) {
217219
var product, row, productChanged = {};
@@ -369,6 +371,14 @@ define([
369371
.prop('disabled', true);
370372
});
371373
},
374+
showPrice: function () {
375+
var priceContainer = $('[id="attribute-price-container"]');
376+
if (this.productMatrix().length !== 0) {
377+
priceContainer.hide();
378+
} else {
379+
priceContainer.show();
380+
}
381+
},
372382

373383
/**
374384
* Get currency symbol

0 commit comments

Comments
 (0)