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
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
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
GetCategoryBasedParentGroups(Group, string)
[Obsolete("Use 'GetCategoryBasedParentGroups' without language instead")]
public IEnumerable<Group> GetCategoryBasedParentGroups(Group group, string languageId)
Parameters
Returns
GetCategoryBasedParentGroups(Product)
[Obsolete]
public IEnumerable<Group> GetCategoryBasedParentGroups(Product product)
Parameters
product
Product
Returns
GetCategoryBasedParentGroups(Product, string)
[Obsolete("Use 'GetCategoryBasedParentGroups' with languageId instead")]
public IEnumerable<Group> GetCategoryBasedParentGroups(Product product, string languageId)
Parameters
Returns
GetFieldById(string, string)
Gets category field by id and cartegory id
public Field GetFieldById(string categoryId, string fieldId)
Parameters
Returns
GetFieldById(string, string, string)
[Obsolete("Use GetFieldById(string categoryId, string fieldId) instead.")]
public Field GetFieldById(string categoryId, string fieldId, string languageId)
Parameters
Returns
GetFieldsByCategoryId(string)
public FieldCollection GetFieldsByCategoryId(string categoryId)
Parameters
categoryId
string
Returns
GetFieldsByCategoryId(string, string)
[Obsolete("Use the overload without 'languageId'.")]
public FieldCollection GetFieldsByCategoryId(string categoryId, string languageId)
Parameters
Returns
GetInheritedCategories(IEnumerable<Group>, bool)
public IEnumerable<Category> GetInheritedCategories(IEnumerable<Group> groups, bool includeProductProperties)
Parameters
groups
IEnumerable<Group>includeProductProperties
bool
Returns
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
stringincludeProductProperties
bool
Returns
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
Returns
UpdateReferenceFields(Field)
Update all reference fields by SetLabel(string, string), SetDescription(string, string), PresentationType, HideEmpty, FieldOptions, SetValidationErrorMessage(string, string) and DoNotRender for specified systemfield
public void UpdateReferenceFields(Field theField)
Parameters
theField
Field