Class OrderLineFieldService
- Namespace
- Dynamicweb.Ecommerce.Orders
- Assembly
- Dynamicweb.Ecommerce.dll
Provides access to the custom fields defined on order lines, and to their product group and shop relations.
public class OrderLineFieldService : ICacheStorage<string, OrderLineField>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
OrderLineFieldService
- Implements
- Inherited Members
Methods
ClearCache()
Resets all keys to the default value for objects stored in the object cache
public void ClearCache()
ClearRelationCaches()
Clears the cached product group and shop relation indexes, so they are rebuilt on next access.
public virtual void ClearRelationCaches()
Delete(OrderLineField)
Deletes a given order line field.
public virtual void Delete(OrderLineField field)
Parameters
fieldOrderLineFieldField to delete.
DeleteOrderLineFieldRelationForGroup(string, OrderLineField)
Removes an order line field relation for a given Group.
public virtual void DeleteOrderLineFieldRelationForGroup(string groupId, OrderLineField field)
Parameters
groupIdstringIdentifier of the group.
fieldOrderLineFieldRelated order line field.
DeleteOrderLineFieldRelationForShop(string, OrderLineField)
Removes an order line field relation for a given Shop.
public virtual void DeleteOrderLineFieldRelationForShop(string shopId, OrderLineField field)
Parameters
shopIdstringIdentifier of the shop.
fieldOrderLineFieldRelated order line field.
DeleteOrderLineFieldRelationsBySystemName(string)
Deletes all order line field relations by field system name.
public virtual void DeleteOrderLineFieldRelationsBySystemName(string systemName)
Parameters
systemNamestringSystem name of the field.
DeleteOrderLineFieldRelationsForGroup(string)
Removes all order line field relations for a given Group.
public virtual void DeleteOrderLineFieldRelationsForGroup(string groupId)
Parameters
groupIdstringIdentifier of the group.
DeleteOrderLineFieldRelationsForShop(string)
Removes all order line field relations for a given Shop.
public virtual void DeleteOrderLineFieldRelationsForShop(string shopId)
Parameters
shopIdstringIdentifier of the group.
GetOrderLineFieldBySystemName(string)
Gets an order line field by system name.
public virtual OrderLineField? GetOrderLineFieldBySystemName(string systemName)
Parameters
systemNamestringSystem name of the field.
Returns
- OrderLineField
An instance of OrderLineField, if found; otherwise, null.
GetOrderLineFieldRelationsByGroup(string)
Gets all order line field relations for a given Group.
public virtual OrderLineFieldCollection GetOrderLineFieldRelationsByGroup(string groupId)
Parameters
groupIdstringIdentifier of the group.
Returns
- OrderLineFieldCollection
A sorted collection of fields related to the given group.
GetOrderLineFieldRelationsByShop(string)
Gets all order line field relations for a given Shop.
public virtual OrderLineFieldCollection GetOrderLineFieldRelationsByShop(string shopId)
Parameters
shopIdstringIdentifier of the shop.
Returns
- OrderLineFieldCollection
A sorted collection of fields related to the given shop.
GetOrderLineFields()
Gets all order line fields.
public virtual OrderLineFieldCollection GetOrderLineFields()
Returns
- OrderLineFieldCollection
A sorted collection of OrderLineField.
Save(OrderLineField)
Saves a given order line field.
public virtual void Save(OrderLineField field)
Parameters
fieldOrderLineFieldField to save.
SaveOrderLineFieldRelationForGroup(string, OrderLineField)
Adds an order line field relation for a given Group.
public virtual void SaveOrderLineFieldRelationForGroup(string groupId, OrderLineField field)
Parameters
groupIdstringIdentifier of the group.
fieldOrderLineFieldRelated order line field.
SaveOrderLineFieldRelationForShop(string, OrderLineField)
Adds an order line field relation for a given Shop.
public virtual void SaveOrderLineFieldRelationForShop(string shopId, OrderLineField field)
Parameters
shopIdstringIdentifier of the shop.
fieldOrderLineFieldRelated order line field.
SaveOrderLineFieldRelationsForGroup(string, OrderLineFieldCollection)
Saves the order line field relations for a given Group.
public virtual void SaveOrderLineFieldRelationsForGroup(string groupId, OrderLineFieldCollection fields)
Parameters
groupIdstringIdentifier of the group.
fieldsOrderLineFieldCollectionRelated order line fields.
SaveOrderLineFieldRelationsForShop(string, OrderLineFieldCollection)
Saves the order line field relations for a given Shop.
public virtual void SaveOrderLineFieldRelationsForShop(string shopId, OrderLineFieldCollection fields)
Parameters
shopIdstringIdentifier of the shop.
fieldsOrderLineFieldCollectionRelated order line fields.