The code below to add the modifier doesn't work if the there are variants and the modifier is put in to the box on the Edit variants for the product, but the price has been deleted from the price in the option grid.
Code: Select all
if (optionOption.PriceModifier > 0)
{
aspOptions.Items.Add(new ListItem(optionOption.Name + " ( +" + optionOption.PriceModifier.ToString("ulc") + ")", optionOption.OptionChoiceId.ToString()));
}
else if (optionOption.PriceModifier < 0)
{
aspOptions.Items.Add(new ListItem(optionOption.Name + " ( " + optionOption.PriceModifier.ToString("ulc") + ")", optionOption.OptionChoiceId.ToString()));
}
else
{
aspOptions.Items.Add(new ListItem(optionOption.Name, optionOption.OptionChoiceId.ToString()));
}
Thanks