Table of Contents

Class VariantOption

Namespace
Dynamicweb.Ecommerce.Variants
Assembly
Dynamicweb.Ecommerce.dll

A variant option in a variant group.

[Serializable]
public class VariantOption : IComparable<VariantOption>
Inheritance
VariantOption
Implements
Inherited Members

Constructors

VariantOption()

Initializes a new instance of the VariantOption class.

public VariantOption()

Properties

Color

Gets or sets the color.

public string Color { get; set; }

Property Value

string

GroupId

Gets or sets the group id.

public string GroupId { get; set; }

Property Value

string

Icon

Gets or sets the icon.

public string Icon { get; set; }

Property Value

string

Id

Gets or sets the id.

public string Id { get; set; }

Property Value

string

LargeImage

Gets or sets the large image.

public string LargeImage { get; set; }

Property Value

string

MediumImage

Gets or sets the medium image.

public string MediumImage { get; set; }

Property Value

string

SmallImage

Gets or sets the small image.

public string SmallImage { get; set; }

Property Value

string

SortOrder

Gets or sets the sort order.

public int SortOrder { get; set; }

Property Value

int

Translations

Gets the translations

public TranslationCollection<VariantOptionTranslation> Translations { get; }

Property Value

TranslationCollection<VariantOptionTranslation>

Methods

Clone()

Clones this instance.

public VariantOption Clone()

Returns

VariantOption

The instance of the VariantOption.

CompareTo(VariantOption)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(VariantOption other)

Parameters

other VariantOption

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

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.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetName(string)

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

public string GetName(string languageId)

Parameters

languageId string

Language id

Returns

string

GetPropertyValue(string, string)

Gets property value for the given language

public string GetPropertyValue(string languageId, string propertyId)

Parameters

languageId string

Language id

propertyId string

Property id

Returns

string

SetName(string, string)

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

public void SetName(string languageId, string name)

Parameters

languageId string

Language id

name string

Variant option name

To top