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

description string

Field description

Returns

Field

New Field object

CreateField(string, Category, string, string, string, string, FieldListPresentationType, string, bool, bool, bool)

Creates new category field for the category

public Field CreateField(string id, Category category, string templateTag, string label, string type, string defaultValue, FieldListPresentationType presentation, string description, bool allowChangesAcrossLanguages, bool allowChangesAcrossVariants, bool fieldRequired)

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)

description string

Field description

allowChangesAcrossLanguages bool

Allow changes across languages

allowChangesAcrossVariants bool

Allow changes across variants

fieldRequired bool

Field description

Returns

Field

New Field object

CreateField(string, Category, string, string, string, string, FieldListPresentationType, 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, 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)

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.

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

GetFieldsByCategoryId(string)

public FieldCollection GetFieldsByCategoryId(string categoryId)

Parameters

categoryId 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>

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