Table of Contents

Class AssortmentService

Namespace
Dynamicweb.Ecommerce.Assortments
Assembly
Dynamicweb.Ecommerce.dll
public class AssortmentService : ICacheStorage<string, Assortment>, ICacheStorage<string>, ICacheStorage
Inheritance
AssortmentService
Implements
Inherited Members

Properties

Info

Information about the object cache

public CacheInformation Info { get; }

Property Value

CacheInformation

Methods

BuildAssortment(Assortment)

Starts the assortment building.

public virtual void BuildAssortment(Assortment assortment)

Parameters

assortment Assortment

The assortment object.

ClearCache()

Resets all keys to the default value for objects stored in the object 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> key)

Parameters

key IEnumerable<string>

ClearCache(string)

Resets the specified key to the default value for objects stored in the object cache

public void ClearCache(string key)

Parameters

key string

Key to reset

DeleteAssortment(Assortment)

Deletes the Assortment and all its items, relations and permissions.

public void DeleteAssortment(Assortment assortment)

Parameters

assortment Assortment

The assortment object.

DeleteAssortmentItem(AssortmentItem)

Deletes the AssortmentItem

public virtual void DeleteAssortmentItem(AssortmentItem assortmentItem)

Parameters

assortmentItem AssortmentItem

The assortment item object.

DeleteAssortmentItems(Assortment)

Deletes the assortment items.

public virtual void DeleteAssortmentItems(Assortment assortment)

Parameters

assortment Assortment

The assortment object.

DeleteAssortmentItems(IEnumerable<AssortmentItem>)

Deletes the assortment items.

public virtual void DeleteAssortmentItems(IEnumerable<AssortmentItem> assortmentItems)

Parameters

assortmentItems IEnumerable<AssortmentItem>

The assortment items collection.

DeleteAssortmentItems(string)

Deletes the assortment items.

public virtual void DeleteAssortmentItems(string assortmentId)

Parameters

assortmentId string

The assortment ID.

DeleteAssortmentPermission(AssortmentPermission)

Deletes the AssortmentPermission.

public virtual void DeleteAssortmentPermission(AssortmentPermission assortmentPermission)

Parameters

assortmentPermission AssortmentPermission

The assortment permission object.

DeleteAssortmentRelation(AssortmentRelation)

Deletes the AssortmentRelation.

public virtual void DeleteAssortmentRelation(AssortmentRelation assortmentRelation)

Parameters

assortmentRelation AssortmentRelation

The assortment relation object.

DeleteAssortmentRelations(Assortment)

Deletes the assortment relations.

public virtual void DeleteAssortmentRelations(Assortment assortment)

Parameters

assortment Assortment

The assortment object.

DeleteAssortmentRelations(IEnumerable<AssortmentRelation>)

Deletes the assortment relations.

public virtual void DeleteAssortmentRelations(IEnumerable<AssortmentRelation> assortmentRelations)

Parameters

assortmentRelations IEnumerable<AssortmentRelation>

The collection of the assortment relations.

DeleteGroupAssortmentRelations(Assortment, string)

Deletes the group assortment relations.

public virtual void DeleteGroupAssortmentRelations(Assortment assortment, string groupId)

Parameters

assortment Assortment

The assortment object.

groupId string

The group ID.

DeleteGroupAssortmentRelations(IEnumerable<AssortmentGroupRelation>)

Deletes the group assortment relations.

public virtual void DeleteGroupAssortmentRelations(IEnumerable<AssortmentGroupRelation> assortmentRelations)

Parameters

assortmentRelations IEnumerable<AssortmentGroupRelation>

The group assortment relations collection.

DeleteProductAssortmentRelations(Assortment, string, string)

Deletes the product assortment relations.

public virtual void DeleteProductAssortmentRelations(Assortment assortment, string productId, string productVariantId)

Parameters

assortment Assortment

The assortment object.

productId string

The product ID.

productVariantId string

The product variant ID.

DeleteProductAssortmentRelations(IEnumerable<AssortmentProductRelation>)

Deletes the product assortment relations.

public virtual void DeleteProductAssortmentRelations(IEnumerable<AssortmentProductRelation> assortmentRelations)

Parameters

assortmentRelations IEnumerable<AssortmentProductRelation>

The product assortment relations collection.

DeleteShopAssortmentRelations(Assortment, string)

Deletes the assortment relations.

public virtual void DeleteShopAssortmentRelations(Assortment assortment, string shopId)

Parameters

assortment Assortment

The assortment object.

shopId string

The shop ID.

DeleteShopAssortmentRelations(IEnumerable<AssortmentShopRelation>)

Deletes the shop assortment relations.

public virtual void DeleteShopAssortmentRelations(IEnumerable<AssortmentShopRelation> assortmentRelations)

Parameters

assortmentRelations IEnumerable<AssortmentShopRelation>

The shop assortment relations collection.

FlagAssortmentForRebuild(Assortment)

Flags the assortment for rebuild.

public virtual void FlagAssortmentForRebuild(Assortment assortment)

Parameters

assortment Assortment

The assortment object.

GetActiveAssortmentIds()

Gets the IDs of the active assortments.

public virtual IEnumerable<string> GetActiveAssortmentIds()

Returns

IEnumerable<string>

A collection of the assortment IDs.

GetActiveAssortments()

Gets all active assortments.

public virtual IEnumerable<Assortment> GetActiveAssortments()

Returns

IEnumerable<Assortment>

A collection of the Assortment.

GetAllAssortments()

Gets all assortments.

public virtual IEnumerable<Assortment> GetAllAssortments()

Returns

IEnumerable<Assortment>

A collection of the Assortment.

GetAllowAnonymousUsersAssortmentIds()

Gets the ids of all active assortments for the current language that are available to anonymous uses.

public virtual IEnumerable<string> GetAllowAnonymousUsersAssortmentIds()

Returns

IEnumerable<string>

A collection of the assortment IDs.

GetAssortmentById(string)

Gets the Assortment by ID.

public virtual Assortment GetAssortmentById(string assortmentId)

Parameters

assortmentId string

The assortment ID.

Returns

Assortment

The Assortment.

GetAssortmentIdsByUser(User, bool)

Gets the assortment IDs by user.

public virtual IEnumerable<string> GetAssortmentIdsByUser(User user, bool onlyActive)

Parameters

user User

The user.

onlyActive bool

If true take only active assortments.

Returns

IEnumerable<string>

A collection of the assortment IDs.

GetAssortmentPermissionsByUser(User, bool)

Gets the assortment permission for user.

public virtual IEnumerable<AssortmentPermission> GetAssortmentPermissionsByUser(User user, bool includeGroups)

Parameters

user User

The user.

includeGroups bool

Determines whether assortment permissions for user groups should be included in result collection.

Returns

IEnumerable<AssortmentPermission>

A collection of the AssortmentPermission.

GetAssortmentRelationsByGroupId(string)

Gets the assortment relations by group ID.

public virtual IEnumerable<AssortmentGroupRelation> GetAssortmentRelationsByGroupId(string groupId)

Parameters

groupId string

The group ID.

Returns

IEnumerable<AssortmentGroupRelation>

A collection of the AssortmentGroupRelation.

GetAssortmentRelationsByProductId(string, string)

Gets the assortment relations by product ID.

public virtual IEnumerable<AssortmentProductRelation> GetAssortmentRelationsByProductId(string productId, string productVariantId)

Parameters

productId string

The product ID.

productVariantId string

The product variant ID.

Returns

IEnumerable<AssortmentProductRelation>

A collection of the AssortmentProductRelation.

GetAssortmentRelationsByShopId(string)

Gets the assortment relations by shop ID.

public virtual IEnumerable<AssortmentShopRelation> GetAssortmentRelationsByShopId(string shopId)

Parameters

shopId string

The shop ID.

Returns

IEnumerable<AssortmentShopRelation>

A collection of the AssortmentShopRelation.

GetAssortmentsByProduct(Product)

Gets the assortments by product.

public virtual IEnumerable<Assortment> GetAssortmentsByProduct(Product product)

Parameters

product Product

The product object.

Returns

IEnumerable<Assortment>

A collection of the Assortment.

GetAssortmentsByProductId(string, string, string)

Gets the assortments by product ID.

public virtual IEnumerable<Assortment> GetAssortmentsByProductId(string productId, string variantId, string languageId)

Parameters

productId string

The product ID.

variantId string

The variant ID.

languageId string

Returns

IEnumerable<Assortment>

A collection of the Assortment.

GetAssortmentsForBuild()

Gets assortments which require build.

public virtual IEnumerable<Assortment> GetAssortmentsForBuild()

Returns

IEnumerable<Assortment>

A collection of the Assortment.

GetNotActiveAssortmentIds()

Gets the IDs of the not active assortments.

public virtual IEnumerable<string> GetNotActiveAssortmentIds()

Returns

IEnumerable<string>

A collection of the assortment IDs.

HasAccessToProduct(Product, User)

public virtual bool HasAccessToProduct(Product product, User user)

Parameters

product Product
user User

Returns

bool

HasActiveAssortments()

Determines whether there are active assortments.

public virtual bool HasActiveAssortments()

Returns

bool

True, if solution have one or more active assortments, otherwise False.

LoadAssortmentGroupRelations(string)

public virtual Dictionary<string, AssortmentGroupRelation> LoadAssortmentGroupRelations(string assortmentId)

Parameters

assortmentId string

Returns

Dictionary<string, AssortmentGroupRelation>

LoadAssortmentPermissions(string)

public virtual Dictionary<int, AssortmentPermission> LoadAssortmentPermissions(string assortmentId)

Parameters

assortmentId string

Returns

Dictionary<int, AssortmentPermission>

LoadAssortmentProductRelations(string)

public virtual Dictionary<string, AssortmentProductRelation> LoadAssortmentProductRelations(string assortmentId)

Parameters

assortmentId string

Returns

Dictionary<string, AssortmentProductRelation>

LoadAssortmentShopRelations(string)

public virtual Dictionary<string, AssortmentShopRelation> LoadAssortmentShopRelations(string assortmentId)

Parameters

assortmentId string

Returns

Dictionary<string, AssortmentShopRelation>

MoveAssortments(IEnumerable<ProductVariantMoveSetting>)

public virtual void MoveAssortments(IEnumerable<ProductVariantMoveSetting> moveSettings)

Parameters

moveSettings IEnumerable<ProductVariantMoveSetting>

SaveAssortment(Assortment, bool)

Saves the Assortment.

public virtual void SaveAssortment(Assortment assortment, bool doInstallStep = true)

Parameters

assortment Assortment

The assortment object.

doInstallStep bool

SaveAssortmentItem(AssortmentItem)

Saves the AssortmentItem.

public virtual void SaveAssortmentItem(AssortmentItem assortmentItem)

Parameters

assortmentItem AssortmentItem

The assortment item object.

SaveAssortmentPermission(AssortmentPermission)

public virtual void SaveAssortmentPermission(AssortmentPermission assortmentPermission)

Parameters

assortmentPermission AssortmentPermission

The assortment permission object.

SaveAssortmentRelation(AssortmentRelation)

Saves the AssortmentRelation.

public virtual void SaveAssortmentRelation(AssortmentRelation assortmentRelation)

Parameters

assortmentRelation AssortmentRelation

The assortment relation object.

To top