Hello,
I have a meta field attribute, let's say "Color", and
"Size" defined as Dictionary, with the "color" having
multiple-selection checked. When I retrieve the value for a product in the
front, it gives me all the values for multiple selection for “Color”(I am using
following code for this). When I select first multiple selection value for
Color from drop down it populates the corresponding "Size" value. It
happens only for FIRST, multiple select option for "Color".
If we select any other multiple select option for "Color" it does not
populate corresponding "Size" value in front store.
Please let me know how can I get ?
public string GetMetaField(string name, Item item)
{
ItemAttribute attr = ClientHelper.GetAttributeByName(name, item.ItemAttributes);
string returnString = null;
if (attr != null && attr.Value != null && attr.Value.Length > 0)
{
int i=0;
for (i=0; i < attr.Value.Length; i++) {
if (i>0) {
returnString = returnString + ", " + attr.Value[i].ToString();
} else {
returnString += attr.Value[i].ToString();
}
}
return returnString;
}
return String.Empty;
}
Thanks in advance