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 void Delete(IEnumerable<Product> products)

Parameters

products IEnumerable<Product>
Related products collection.

Delete(string)

Delete Detail object by row ID
public void Delete(string detailId)

Parameters

detailId string
ID of Detail object to delete

Delete(string, string, string, string)

Delete Detail object by row ID, language ID, product ID and optional product variant ID
[Obsolete("Use Delete(detailId As String) instead")]
public void Delete(string detailId, string detailLanguageId, string detailProductId, string detailVariantId)

Parameters

detailId string
ID of Detail object to delete
detailLanguageId string
Product language ID
detailProductId string
Product ID
detailVariantId string
Product variant ID (optional)

GetAllValues()

public IEnumerable<Detail> GetAllValues()

Returns

IEnumerable<Detail>

GetDefaultDetail(Product)

Gets default detail for product consider inheritance
public 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 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 Detail GetDetail(string detailId)

Parameters

detailId string
ID of Detail row

Returns

Detail

GetDetail(string, string, string)

Gets the detail by ID, related product ID and variant ID
[Obsolete("Use GetDetail(detailId) instead.")]
public Detail GetDetail(string detailId, string detailProductId, string detailVariantId)

Parameters

detailId string
ID of Detail row
detailProductId string
Related product ID
detailVariantId string
Product variant ID

Returns

Detail

GetDetails()

Select all product details
public IEnumerable<Detail> GetDetails()

Returns

IEnumerable<Detail>
Collection of Detail objects for all products in database

GetDetails(Product)

Select details for a product
public 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 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 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 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 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>>

Save(Detail, Product)

Save details for provided product
public void Save(Detail detail, Product product)

Parameters

detail Detail
Detail to save
product Product
Product object

Save(Detail, string, string)

Save details for provided product and variant
public void Save(Detail detail, string detailProductId, string detailVariantId)

Parameters

detail Detail
Detail to save
detailProductId string
Product ID
detailVariantId string
Product variant ID

Remarks

If there is no existing detail row for detailId, procedure creates the new one

SetDetailsGroup(Detail, int?)

Assign details group to detail
public 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 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 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