Skip to content

Commit

Permalink
magento#13177: Can't save attributes on a configurable product.
Browse files Browse the repository at this point in the history
- fix error while saving configurable product after validation error.
  • Loading branch information
al.kravchuk committed Jul 6, 2018
1 parent d866b18 commit bc00d8e
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,17 @@ define([
* - associated_product_ids_serialized.
*/
serializeData: function () {
this.source.data['configurable-matrix-serialized'] =
JSON.stringify(this.source.data['configurable-matrix']);

delete this.source.data['configurable-matrix'];

this.source.data['associated_product_ids_serialized'] =
JSON.stringify(this.source.data['associated_product_ids']);
if (this.source.data['configurable-matrix']) {
this.source.data['configurable-matrix-serialized'] =
JSON.stringify(this.source.data['configurable-matrix']);
delete this.source.data['configurable-matrix'];
}

delete this.source.data['associated_product_ids'];
if (this.source.data['associated_product_ids']) {
this.source.data['associated_product_ids_serialized'] =
JSON.stringify(this.source.data['associated_product_ids']);
delete this.source.data['associated_product_ids'];
}
},

/**
Expand Down

0 comments on commit bc00d8e

Please sign in to comment.