Table of Contents

Class DetailService

Namespace
Dynamicweb.Ecommerce.Products
Assembly
Dynamicweb.Ecommerce.dll
public class DetailService : ICacheStorage<string, Detail>, ICacheStorage<string>, ICacheStorage
Inheritance
DetailService
Implements
Inherited Members

Methods

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> keys)

Parameters

keys IEnumerable<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

key string

Key to reset

Delete(IEnumerable<Product>)

Delete details for collection of products

public virtual void Delete(IEnumerable<Product> products)

Parameters

products IEnumerable<Product>

Related products collection.

Delete(string)

Delete Detail object by row ID

public virtual void Delete(string detailId)

Parameters

detailId string

ID of Detail object to delete

GetAllDetailsByProductId(string, string?)

public virtual IEnumerable<Detail> GetAllDetailsByProductId(string productId, string? detailType)

Parameters

productId string
detailType string

Returns

IEnumerable<Detail>

GetAllValues()

public virtual IEnumerable<Detail> GetAllValues()

Returns

IEnumerable<Detail>

GetDefaultDetail(Product)

Gets default detail for product consider inheritance

public virtual Detail? GetDefaultDetail(Product product)

Parameters

product Product

The product for realted detail.

Returns

Detail

The defautlt detail.

GetDefaultDetail(string, string, string)

Gets default detail for product consider inheritance

public virtual Detail? GetDefaultDetail(string productId, string productVariantId, string languageId)

Parameters

productId string
productVariantId string
languageId string

Returns

Detail

The defautlt detail.

GetDetail(string)

Gets the detail by ID

public virtual Detail? GetDetail(string detailId)

Parameters

detailId string

ID of Detail row

Returns

Detail

GetDetailMoveSettings(Product, string)

Identifies which Details should be extracted from one product and moved to the other Product

public virtual IEnumerable<DetailMoveSetting> GetDetailMoveSettings(Product languageVariant, string newProductId)

Parameters

languageVariant Product

The Product of the family, containing information about where the product was previously located

newProductId string

The new ProductId the product will be given after it has been extracted

Returns

IEnumerable<DetailMoveSetting>

Exceptions

ArgumentNullException

If languageVariant is null

GetDetails()

Select all product details

public virtual IEnumerable<Detail> GetDetails()

Returns

IEnumerable<Detail>

Collection of Detail objects for all products in database

GetDetails(Product)

Select details for a product

public virtual IEnumerable<Detail> GetDetails(Product product)

Parameters

product Product

Product to select details for

Returns

IEnumerable<Detail>

Collection of Detail objects for income product

GetDetails(Product, string?)

Selected details of some type for income product

public virtual IEnumerable<Detail> GetDetails(Product product, string? detailType)

Parameters

product Product

Product to select details for

detailType string

Details type, use an empty string to select all details

Returns

IEnumerable<Detail>

Collection of Detail objects

GetDetails(Product, string?, bool)

Selected details of some type for income product

public virtual IEnumerable<Detail> GetDetails(Product product, string? detailType, bool excludeDefaultImage)

Parameters

product Product

Product to select details for

detailType string

Details type, use an empty string to select all details

excludeDefaultImage bool

Indicates if detail images marked as 'Default' should be excluded

Returns

IEnumerable<Detail>

Collection of Detail objects

GetDetails(string, string, string, string?)

Selected details of some type for income product

public virtual IEnumerable<Detail> GetDetails(string detailLanguageId, string detailProductId, string detailVariantId, string? detailType)

Parameters

detailLanguageId string

Product language ID

detailProductId string

Product ID

detailVariantId string

Product variant ID (optional)

detailType string

Details type, use an empty string to select all details

Returns

IEnumerable<Detail>

Collection of Detail objects

GetDetailsBulk(IEnumerable<ProductKey>, string?, bool)

Gets the details for all the given products

public virtual Dictionary<string, List<Detail>> GetDetailsBulk(IEnumerable<ProductKey> productKeys, string? detailType, bool excludeDefaultImage)

Parameters

productKeys IEnumerable<ProductKey>

The products which details will be found for

detailType string

The type of detail, which should be found

excludeDefaultImage bool

Indicates if the Detail marked as 'Default' should be excluded from the result

Returns

Dictionary<string, List<Detail>>

GetPrimaryDetailsBulk(IEnumerable<ProductKey>, string?)

Gets the primary detail for all the given products

public virtual Dictionary<string, List<Detail>> GetPrimaryDetailsBulk(IEnumerable<ProductKey> productKeys, string? detailType)

Parameters

productKeys IEnumerable<ProductKey>

The products which details will be found for

detailType string

The type of detail, which should be found

Returns

Dictionary<string, List<Detail>>

MoveDetails(IEnumerable<DetailMoveSetting>)

Moves ProductCategoryFieldValues from one product to another.

public virtual void MoveDetails(IEnumerable<DetailMoveSetting> moveSettings)

Parameters

moveSettings IEnumerable<DetailMoveSetting>

This determins which values should be moved and where from/to

Save(Detail)

Save details for provided product

public virtual void Save(Detail detail)

Parameters

detail Detail

Detail to save

SetDetailsGroup(Detail, int?)

Assign details group to detail

public virtual void SetDetailsGroup(Detail detail, int? groupId)

Parameters

detail Detail

The detail

groupId int?

Details group id

SetDetailsGroup(Product, string, int?)

Assign details group to detail

public virtual void SetDetailsGroup(Product product, string detailId, int? groupId)

Parameters

product Product

The product

detailId string

Detail id

groupId int?

Details group id

UpdateDefaultDetailForProduct(Product, string?)

Updates default detail for specific product

public virtual void UpdateDefaultDetailForProduct(Product product, string? detailId)

Parameters

product Product

Product to change default detail

detailId string

Detail id

Remarks

If detail Id not set - updates all the details so they are not default

To top