Class VariantGroup
- Namespace
- Dynamicweb.Ecommerce.Variants
- Assembly
- Dynamicweb.Ecommerce.dll
A variant group that hold variant options
[Serializable]
public class VariantGroup : IEquatable<VariantGroup>
- Inheritance
-
VariantGroup
- Implements
- Inherited Members
Constructors
VariantGroup()
Initializes a new instance of the VariantGroup class.
public VariantGroup()
Properties
Family
Gets or sets a value indicating whether this VariantGroup is family.
public bool Family { get; set; }
Property Value
- bool
true
if family, otherwise,false
.
Id
Gets or sets the id.
public string Id { get; set; }
Property Value
Translations
Gets the translations
public TranslationCollection<VariantGroupTranslation> Translations { get; }
Property Value
VariantDisplayType
public VariantGroupDisplayType VariantDisplayType { get; set; }
Property Value
Methods
Equals(VariantGroup)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(VariantGroup group)
Parameters
group
VariantGroup
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetAllVariantOptions()
Gets all variant options for this group.
public IList<VariantOption> GetAllVariantOptions()
Returns
- IList<VariantOption>
variantOptions
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetLabel(string)
Gets the label of the variant group for the given language.
public string GetLabel(string languageId)
Parameters
languageId
stringLanguage id
Returns
GetName(string)
Gets the name of the variant group for the given language.
public string GetName(string languageId)
Parameters
languageId
stringLanguage id
Returns
GetProperties()
Gets the properties of this group.
public IList<VariantGroupProperty> GetProperties()
Returns
- IList<VariantGroupProperty>
properties
GetVariantGroupProductRelations()
Gets all product relations.
public IEnumerable<VariantGroupProductRelation> GetVariantGroupProductRelations()
Returns
- IEnumerable<VariantGroupProductRelation>
productsRelations
GetVariantOptions(string)
Gets all existing variant options from this group, for the specified product.
public IList<VariantOption> GetVariantOptions(string productId)
Parameters
productId
stringId of product
Returns
- IList<VariantOption>
variantOptions
SetLabel(string, string)
Sets the label of the variant group for the given language.
public void SetLabel(string languageId, string label)
Parameters
SetName(string, string)
Sets the name of the variant group for the given language.
public void SetName(string languageId, string name)