Dynamicweb.eCommerce.Products Namespace > Product Class : UpdateDefaultVariantID Method |
'Declaration
Public Shared Function UpdateDefaultVariantID( _ ByVal prod As Product, _ ByVal variantComboID As String _ ) As Integer
class MyPage : System.Web.UI.Page { public void VariantOptions(Product prod) { string overwriteDefaultVarCombo = string.Empty; if (Request["saveVariant"] == "1") { Dynamicweb.eCommerce.Variants.VariantCombinationCollection vars = Dynamicweb.eCommerce.Variants.VariantCombination.getProductCombinations(prod); Product.UpdateVariantCnt(prod, vars.Count); } if (Request["saveDefaultVariant"] == "1") { if (!string.IsNullOrEmpty(Base.ChkString(Base.Request("DefaultVariantComboID")))) { overwriteDefaultVarCombo = Base.ChkString(Base.Request("DefaultVariantComboID")); } Product.UpdateDefaultVariantID(prod, overwriteDefaultVarCombo); } } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2