Has options check applied on frontend for options related to select and multiselect attributes

This commit is contained in:
Prashant Singh 2019-07-17 16:18:10 +05:30
parent 4017e3b16e
commit 3d53a221ef
1 changed files with 9 additions and 2 deletions

View File

@ -560,12 +560,19 @@
this.attribute_values = JSON.parse(JSON.parse(data.actions).attribute_conditions).attributes;
// creating the options and the has option param on the frontend
for (i in this.attribute_values) {
for (j in this.attribute_input) {
if (this.attribute_input[j].code == this.attribute_values[i].attribute) {
this.attribute_values[i].has_options = true;
if (this.attribute_input[j].has_options == true) {
this.attribute_values[i].has_options = true;
this.attribute_values[i].options = this.attribute_input[j].options;
this.attribute_values[i].options = this.attribute_input[j].options;
} else {
this.attribute_values[i].has_options = false;
this.attribute_values[i].options = null;
}
}
}
}