Dynamicweb.eCommerce.Products Namespace > Product Class : RemoveVariantGroupLoop Method |
'Declaration
Public Sub RemoveVariantGroupLoop( _ ByVal variantGroup As VariantGroup _ )
public void RemoveVariantGroupLoop( VariantGroup variantGroup )
class MyPage : System.Web.UI.Page { private void DeleteVariantGroupProductRelated() { Product product = (Product)Session["Ecom.Backend.Product"]; string variantGroupID = HttpContext.Current.Request.QueryString["grpArr"]; Dynamicweb.eCommerce.Variants.VariantGroup variantGroup = Dynamicweb.eCommerce.Variants.VariantGroup.Create(variantGroupID); product.RemoveVariantGroupLoop(variantGroup); Dynamicweb.eCommerce.Variants.VariantGroupProductRelation variantGroupProductRelation = new Dynamicweb.eCommerce.Variants.VariantGroupProductRelation(); variantGroupProductRelation.Delete(product.ID, variantGroupID); Dynamicweb.eCommerce.Variants.VariantCombination variantCombination = new Dynamicweb.eCommerce.Variants.VariantCombination(); variantCombination.Delete(product.ID); product.VariantGroups = null; product.VariantCombinations = null; } }
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