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
GroupId
Gets or sets the group id.
public string GroupId { get; set; }
Property Value
Icon
Gets or sets the icon.
public string Icon { get; set; }
Property Value
Id
Gets or sets the id.
public string Id { get; set; }
Property Value
LargeImage
Gets or sets the large image.
public string LargeImage { get; set; }
Property Value
MediumImage
Gets or sets the medium image.
public string MediumImage { get; set; }
Property Value
SmallImage
Gets or sets the small image.
public string SmallImage { get; set; }
Property Value
SortOrder
Gets or sets the sort order.
public int SortOrder { get; set; }
Property Value
Translations
Gets the translations
public TranslationCollection<VariantOptionTranslation> Translations { get; }
Property Value
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
VariantOptionAn 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
objectThe object to compare with the current object.
Returns
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
stringLanguage id
Returns
GetPropertyValue(string, string)
Gets property value for the given language
public string GetPropertyValue(string languageId, string propertyId)
Parameters
Returns
SetName(string, string)
Sets the name of the variant option for the given language.
public void SetName(string languageId, string name)