Class VariantGroupService
- Namespace
- Dynamicweb.Ecommerce.Variants
- Assembly
- Dynamicweb.Ecommerce.dll
public class VariantGroupService : ICacheStorage<string, VariantGroup>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
Variant
Group Service
- Implements
- Inherited Members
Methods
ClearCache()
Clears the variant groups cache
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
keys
IEnumerable<string>Keys to reset
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
stringKey to reset
ClearOptionValues()
Clears variant group property values cache.
ClearVariantGroupProductRelationCache()
Clears the variant groups cache
ClearVariantGroupPropertiesCache()
Clears variant group properties cache.
CreateProductRelation(string, string)
Parameters
Delete(VariantGroup)
Deletes the variant group with the specified id.
Parameters
variantGroup
VariantGroup
DeleteOptionValues(string)
Delete variant group property values for variant option
Parameters
optionId
string
DeleteOptionValues(string, string)
Delete variant group property values for variant option and language
Parameters
DeleteProductRelation(string, string, string)
Deletes instances with the specified parameters.
Parameters
DeleteProductRelations(IEnumerable<Product>)
Deletes instances with the specified parameters.
Parameters
products
IEnumerable<Product>The IEnumerable<T>.
DeleteVariantGroup(string)
Deletes the variant group with the specified id.
Parameters
variantGroupId
string
DeleteVariantGroupProperty(VariantGroupProperty)
Deletes instance with the specified parameters.
Parameters
variantGroupProperty
VariantGroup Property The variant group property.
DeleteVariantGroupProperty(string)
Deletes instance with the specified parameters.
Parameters
id
stringThe variant group property id.
DeleteVariantGroupPropertyByGroupId(string)
Deletes instance with the specified parameters.
Parameters
variantGroupId
string
GetAllVariantGroups()
Gets all variant groups.
Returns
- IList<Variant
Group > The IList<T>.
Remarks
Result variant group list includes 'family' variant groups
GetFamilyVariantGroups()
Gets all variant groups which are 'family'.
Returns
- IList<Variant
Group > The IList<T>.
Remarks
Result 'family' variant group list
GetFilteredVariantGroups()
Gets the variant groups list in which 'family' groups are excluded.
Returns
- IList<Variant
Group > The list of variant groups.
Remarks
Result variant group list includes variant groups e.g. 'family' variant groups excluded from results
GetProductRelations(VariantGroup)
Gets the relations.
Parameters
variantGroup
VariantGroup The Variant
Group .
Returns
- IEnumerable<Variant
Group >Product Relation The collection of the Variant
Group .Product Relation
GetProductRelations(VariantGroup, string)
Gets the relations.
public IEnumerable<VariantGroupProductRelation> GetProductRelations(VariantGroup variantGroup, string productId)
Parameters
variantGroup
VariantGroup The Variant
Group .productId
stringThe product id.
Returns
- IEnumerable<Variant
Group >Product Relation The collection of the Variant
Group .Product Relation
GetProductRelations(string)
Gets the relations.
Parameters
productId
stringThe product id.
Returns
- IEnumerable<Variant
Group >Product Relation The collection of the Variant
Group .Product Relation
GetVariantGroup(string)
Parameters
variantGroupId
string
Returns
GetVariantGroupOptionPropertyValue(string, string, string, bool)
Gets variant group property value from the option
public string GetVariantGroupOptionPropertyValue(string optionId, string propertyId, string languageId, bool showUntranslated = false)
Parameters
optionId
stringThe option id.
propertyId
stringThe property id.
languageId
stringThe language id.
showUntranslated
boolShould show untranslated or not.
Returns
- string
The variant group property value
GetVariantGroupProperties()
Gets the variant group properties
Returns
- IEnumerable<Variant
Group >Property variantGroupProperties
GetVariantGroupProperty(string)
Gets the variant group properties for the specified group.
Parameters
groupId
stringGroup id
Returns
- IList<Variant
Group >Property variantGroupProperties
GetVariantGroupsByProductId(string)
Gets the variant groups with options.
Parameters
productId
stringThe product id.
Returns
- IList<Variant
Group > The IList<T>.
Save(VariantGroup)
Saves the current instance with the specified id.
Parameters
variantGroup
VariantGroup
Save(VariantGroupProductRelation)
Parameters
relation
VariantGroup Product Relation
Save(VariantGroupProperty)
Saves group property
Parameters
variantGroupProperty
VariantGroup Property The variant group property.
SaveValue(string, string, string, string)
Saves group property value
Parameters
optionId
stringThe option id
propertyId
stringThe property id
languageId
stringThe language id
propertyValue
stringThe property value
VariantGroupCounter(string)
Gets the product relations count.
Parameters
productId
stringThe product.
Returns
- int
Count of the relations.