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
Methods
AddReferenceFields(IEnumerable<string>, string)
Adds reference fields to target category.
public virtual void AddReferenceFields(IEnumerable<string> systemFieldUniqueIds, string targetCategoryId)
Parameters
systemFieldUniqueIdsIEnumerable<string>The field unique ids to be referenced. GetUniqueId()
targetCategoryIdstringTarget 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
keysIEnumerable<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
keystringKey to reset
CreateField(string, Category, string, string, string, string, FieldListPresentationType, string)
Creates new category field for the category
public virtual Field CreateField(string id, Category category, string templateTag, string label, string type, string defaultValue, FieldListPresentationType presentation, string description)
Parameters
idstringField id
categoryCategoryThe category
templateTagstringField template tag
labelstringField label
typestringField Type
defaultValuestringField Default value(for list types)
presentationFieldListPresentationTypeField list presentation type(for list types)
descriptionstringField description
Returns
CreateField(string, Category, string, string, string, string, FieldListPresentationType, string, bool, bool, bool)
Creates new category field for the category
public virtual 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
idstringField id
categoryCategoryThe category
templateTagstringField template tag
labelstringField label
typestringField Type
defaultValuestringField Default value(for list types)
presentationFieldListPresentationTypeField list presentation type(for list types)
descriptionstringField description
allowChangesAcrossLanguagesboolAllow changes across languages
allowChangesAcrossVariantsboolAllow changes across variants
fieldRequiredboolField description
Returns
CreateField(string, Category, string, string, string, string, FieldListPresentationType, string, string)
Creates new category field for the category
public virtual Field CreateField(string id, Category category, string templateTag, string label, string type, string defaultValue, FieldListPresentationType presentation, string description, string languageId)
Parameters
idstringField id
categoryCategoryThe category
templateTagstringField template tag
labelstringField label
typestringField Type
defaultValuestringField Default value(for list types)
presentationFieldListPresentationTypeField list presentation type(for list types)
descriptionstringField description
languageIdstring
Returns
DeleteField(Field)
Deletes the field.
public virtual void DeleteField(Field theField)
Parameters
theFieldFieldThe field to remove.
GetFieldById(string, string)
Gets category field by id and cartegory id
public virtual Field GetFieldById(string categoryId, string fieldId)
Parameters
Returns
GetFieldsByCategoryId(string)
public virtual FieldCollection GetFieldsByCategoryId(string categoryId)
Parameters
categoryIdstring
Returns
GetInheritedCategories(IEnumerable<Group>, bool)
public virtual IEnumerable<Category> GetInheritedCategories(IEnumerable<Group> groups, bool includeProductProperties)
Parameters
groupsIEnumerable<Group>includeProductPropertiesbool
Returns
SaveField(Field)
Saves this instance.
public virtual void SaveField(Field theField)
Parameters
theFieldField
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 virtual bool ShowField(Field field, Product product)
Parameters
Returns
UpdateReferenceFields(Field)
Update all reference fields by SetLabel(string, string), SetDescription(string, string), PresentationType, HideEmpty, Dynamicweb.Ecommerce.Products.Categories.Field.FieldOptions, SetValidationErrorMessage(string, string) and DoNotRender for specified systemfield
public virtual void UpdateReferenceFields(Field theField)
Parameters
theFieldField