Table of Contents

Class ProductCategoryFieldService

Namespace
Dynamicweb.Ecommerce
Assembly
Dynamicweb.Ecommerce.dll
public class ProductCategoryFieldService : ICacheStorage<string, IDictionary<string, Field>>, ICacheStorage<string>, ICacheStorage
Inheritance
ProductCategoryFieldService
Implements
Inherited Members

Constructors

ProductCategoryFieldService()

public ProductCategoryFieldService()

Methods

AddReferenceFields(IEnumerable<string>, string)

Adds reference fields to target category.
public void AddReferenceFields(IEnumerable<string> systemFieldUniqueIds, string targetCategoryId)

Parameters

systemFieldUniqueIds IEnumerable<string>
The field unique ids to be referenced. GetUniqueId()
targetCategoryId string
Target category id. Must be common or property category type.

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

CreateField(string, Category, string, string, string, string, FieldListPresentationType, FieldOptionCollection, string)

Creates new category field for the category
public Field CreateField(string id, Category category, string templateTag, string label, string type, string defaultValue, FieldListPresentationType presentation, FieldOptionCollection options, string description)

Parameters

id string
Field id
category Category
The category
templateTag string
Field template tag
label string
Field label
type string
Field Type
defaultValue string
Field Default value(for list types)
presentation FieldListPresentationType
Field list presentation type(for list types)
options FieldOptionCollection
Field list options(for list types)
description string
Field description

Returns

Field
New Field object

CreateField(string, Category, string, string, string, string, FieldListPresentationType, FieldOptionCollection, string, string)

Creates new category field for the category
public Field CreateField(string id, Category category, string templateTag, string label, string type, string defaultValue, FieldListPresentationType presentation, FieldOptionCollection options, string description, string languageId)

Parameters

id string
Field id
category Category
The category
templateTag string
Field template tag
label string
Field label
type string
Field Type
defaultValue string
Field Default value(for list types)
presentation FieldListPresentationType
Field list presentation type(for list types)
options FieldOptionCollection
Field list options(for list types)
description string
Field description
languageId string

Returns

Field
New Field object

DeleteField(Field)

Deletes the field.
public void DeleteField(Field theField)

Parameters

theField Field
The field to remove.

GetCategoryBasedParentGroups(Group)

[Obsolete]
public IEnumerable<Group> GetCategoryBasedParentGroups(Group group)

Parameters

group Group

Returns

IEnumerable<Group>

GetCategoryBasedParentGroups(Group, string)

[Obsolete("Use 'GetCategoryBasedParentGroups' without language instead")]
public IEnumerable<Group> GetCategoryBasedParentGroups(Group group, string languageId)

Parameters

group Group
languageId string

Returns

IEnumerable<Group>

GetCategoryBasedParentGroups(Product)

[Obsolete]
public IEnumerable<Group> GetCategoryBasedParentGroups(Product product)

Parameters

product Product

Returns

IEnumerable<Group>

GetCategoryBasedParentGroups(Product, string)

[Obsolete("Use 'GetCategoryBasedParentGroups' with languageId instead")]
public IEnumerable<Group> GetCategoryBasedParentGroups(Product product, string languageId)

Parameters

product Product
languageId string

Returns

IEnumerable<Group>

GetFieldById(string, string)

Gets category field by id and cartegory id
public Field GetFieldById(string categoryId, string fieldId)

Parameters

categoryId string
The category id
fieldId string
The field id

Returns

Field

GetFieldById(string, string, string)

[Obsolete("Use GetFieldById(string categoryId, string fieldId) instead.")]
public Field GetFieldById(string categoryId, string fieldId, string languageId)

Parameters

categoryId string
fieldId string
languageId string

Returns

Field

GetFieldsByCategoryId(string)

public FieldCollection GetFieldsByCategoryId(string categoryId)

Parameters

categoryId string

Returns

FieldCollection

GetFieldsByCategoryId(string, string)

[Obsolete("Use the overload without 'languageId'.")]
public FieldCollection GetFieldsByCategoryId(string categoryId, string languageId)

Parameters

categoryId string
languageId string

Returns

FieldCollection

GetInheritedCategories(IEnumerable<Group>, bool)

public IEnumerable<Category> GetInheritedCategories(IEnumerable<Group> groups, bool includeProductProperties)

Parameters

groups IEnumerable<Group>
includeProductProperties bool

Returns

IEnumerable<Category>

GetInheritedCategories(IEnumerable<Group>, string, bool)

[Obsolete("Use 'GetInheritedCategories' without language instead")]
public IEnumerable<Category> GetInheritedCategories(IEnumerable<Group> groups, string languageId, bool includeProductProperties)

Parameters

groups IEnumerable<Group>
languageId string
includeProductProperties bool

Returns

IEnumerable<Category>

SaveField(Field)

Saves this instance.
public void SaveField(Field theField)

Parameters

theField Field

ShowField(Field, Product)

Return a boolean, which indicates whether or not the field should be shown. This is calculated based on the 'HideIfFieldHasNoValue' and the value of the field.
public bool ShowField(Field field, Product product)

Parameters

field Field
product Product
The product we check for

Returns

bool

UpdateReferenceFields(Field)

public void UpdateReferenceFields(Field theField)

Parameters

theField Field
To top