Field types
Dynamicweb is born with a set of standard field types for creating custom fields such as product fields, product category fields, or order fields – they are:
Field type |
Function |
Text (5-255) |
Standard text field where you can type between 5 and 255 characters |
Editor |
Inserts a WYSIWYG editor where you write a text using various text editing tools. |
Long text |
Inserts a text box where you can type several thousand characters. |
Checkbox |
Inserts a checkbox |
Date |
Inserts a drop down where a date can be selected |
Date/time |
Inserts a drop down where a date and time can be selected |
Integer |
Inserts a field where integers can be entered |
Decimal number |
Inserts a field where decimal numbers can be entered |
Link |
Inserts a field where you can enter a link to another web page or a file in your File Manager |
File Manager |
Inserts a field where you can select a file from your File Manager |
List box |
Inserts a list of options that can be selected/deselected. List type & options must be defined. |
Custom Field Types
In more advanced scenarios you can also create custom field types – these field types allow you to attach a provider to them, a piece of extension code which can be used to e.g. automatically convert from inches to millimeters (Figure 2.1).
To create a custom field type:
- Go to Settings > Ecommerce > Product Catalog > Field Types
- Click New in the toolbar and Name the field
- Select a field type provider
By default, Dynamicweb comes with the following field type providers:
Provider |
Used for |
Comments |
AdvancedXmlDataProvider |
|
|
CalculationProvider |
Calculating a number value based on other field values |
The format used in the calculation is: For example: [{ProductPrice} * 2 + {ProductNumber}] |
ConcatProvider |
Generating a text using values from other fields |
The format used in the calculation is: [{FieldSystemName1}] some text [{FieldSystemName2}] For example: [<b>{ProductName}</b>] is currently not in stock! It is expected back in stock {ProductExpectedDelivery} Fetch product category content: [ProductCategory|equipment|Gear}] |
UnitsFieldTypeProvider |
Creating custom unit types and defining how to convert between them |
|
LengthFieldTypeProvider |
Specifying the preferred length unit per Ecommerce language from a predefined list of units |
|
TemperatureFieldTypeProvider |
Specifying a temperature unit – F, C og K – to use on each Ecommerce language |
|
VolumeFieldTypeProvider |
Specifying the preferred volume unit per Ecommerce language from a predefined list of units |
|
WeightFieldTypeProvider |
Specifying the preferred weight unit per Ecommerce language from a predefined list of units |
|
Once a field type has been created, you can select it when creating custom product and category fields.