Skip to content

Commit c198a1f

Browse files
Issue 9680: Use parent name for variations
1 parent d7c7b6b commit c198a1f

File tree

1 file changed

+6
-2
lines changed
  • app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@ define([
9191
var productSku = this.variationsComponent().getProductValue('sku'),
9292
productPrice = this.variationsComponent().getProductPrice(),
9393
productWeight = this.variationsComponent().getProductValue('weight'),
94+
productName = this.variationsComponent().getProductValue('name'),
9495
variationsKeys = [],
9596
gridExisting = [],
9697
gridNew = [],
9798
gridDeleted = [];
9899

99100
this.variations = [];
100101
_.each(variations, function (options) {
101-
var product, images, sku, quantity, price, variation,
102+
var product, images, sku, name, quantity, price, variation,
102103
productId = this.variationsComponent().getProductIdByOptions(options);
103104

104105
if (productId) {
@@ -110,6 +111,9 @@ define([
110111
sku = productSku + _.reduce(options, function (memo, option) {
111112
return memo + '-' + option.label;
112113
}, '');
114+
name = productName + _.reduce(options, function (memo, option) {
115+
return memo + '-' + option.label;
116+
}, '');
113117
quantity = getSectionValue('quantity', options);
114118

115119
if (!quantity && productId) {
@@ -128,7 +132,7 @@ define([
128132
options: options,
129133
images: images,
130134
sku: sku,
131-
name: sku,
135+
name: name,
132136
quantity: quantity,
133137
price: price,
134138
productId: productId,

0 commit comments

Comments
 (0)