Class ProductRelatedGroupService
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
public class ProductRelatedGroupService : ICacheStorage<string, ProductRelatedGroup>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
ProductRelatedGroupService
- Implements
- Inherited Members
Methods
ClearCache()
Clears the related groups cache
public void ClearCache()
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<string> keys)
Parameters
keysIEnumerable<string>Keys to reset
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(string key)
Parameters
keystringKey to reset
Delete(string)
Deletes the related groups with the specified id.
public virtual void Delete(string groupId)
Parameters
groupIdstringThe related group id.
GetAllRelatedGroups()
Gets all related groups.
public virtual IEnumerable<ProductRelatedGroup> GetAllRelatedGroups()
Returns
GetGroupRelatedProductKeys(string, string, string?)
Gets the collection of group related product keys. The key is a combination of product group, related group and related product information.
public virtual IEnumerable<GroupRelatedProductKey> GetGroupRelatedProductKeys(string groupId, string languageId, string? relatedGroupId)
Parameters
groupIdstringThe product group id.
languageIdstringThe product group language id.
relatedGroupIdstringThe related group id. This is used to filter the relations and return only relations that belong to this group.
Returns
GetProductGroupRelations(string, string, bool)
Gets the related groups with products for product group.
public virtual IEnumerable<ProductRelation> GetProductGroupRelations(string groupId, string languageId, bool doRefactor)
Parameters
groupIdstringProduct group id.
languageIdstringLanguage id.
doRefactorboolif set to
trueremoves not used items from collection.
Returns
GetProductRelatedGroup(string)
Gets the related group.
public virtual ProductRelatedGroup? GetProductRelatedGroup(string groupId)
Parameters
groupIdstringThe related group id.
Returns
GetProductRelations(string, bool)
Gets the related groups with products.
public virtual IEnumerable<ProductRelation> GetProductRelations(string productId, bool doRefactor)
Parameters
productIdstringThe product id.
doRefactorboolif set to
trueremoves not used items from collection.
Returns
Save(ProductRelatedGroup)
Saves the related group.
public virtual void Save(ProductRelatedGroup group)
Parameters
groupProductRelatedGroupThe related group.