Product Variant price in option dropdown
Posted: Wed May 20, 2009 2:22 pm
Is there a way of picking up the price modifier for an option on the product page when the product has variants from the variant price?
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.
Or is this something where they should have the prices in the option grid to start with?
Thanks
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