Table of Contents

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

string

Translations

Gets the translations

public TranslationCollection<VariantGroupTranslation> Translations { get; }

Property Value

TranslationCollection<VariantGroupTranslation>

VariantDisplayType

public VariantGroupDisplayType VariantDisplayType { get; set; }

Property Value

VariantGroupDisplayType

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

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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 string

Language id

Returns

string

GetName(string)

Gets the name of the variant group for the given language.

public string GetName(string languageId)

Parameters

languageId string

Language id

Returns

string

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 string

Id 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

languageId string

Language id

label string

Variant group label

SetName(string, string)

Sets the name of the variant group for the given language.

public void SetName(string languageId, string name)

Parameters

languageId string

Language id

name string

Variant group name

To top