Custom fields

Add new fields to products or categories

Custom fields represents easy way to add new fields to standard records such as products or customers. You can use them to track additional information, and export them using lists or xml feeds.

Custom fields creation

To create a custom field, click on Customization block on main page. You will be presented with all record types available to DataKick platform. When you select a record type, information about its fields and relationships with other records are displayed:

Custom fields

On this page you can click on Create field button to create a new custom field. You can also click on any existing custom field to edit it.

Edit Custom field

When creating field you have to provide following information:

  • Type - data type that will be stored in this field. See information below
  • Display name - name for this field
  • Alias - alias this field will be referenced within record type. Alias must be unique (within record type). Aliases must be in camel case format, for example exampleOfCamelCase

Types of custom fields

When creating custom field you have to choose data type. Each data type can have specific configuration

  • Boolean - field will contain yes/no values
  • Currency - field will contain amounts. You have to choose in what currency the amount will be denominated
    • fixed - you can choose fixed currency - all values stored in this field will be in this currency
    • variable - when you edit field, you will have to provide both amount and currency information
  • Date - field will contain date. You can choose subtype
    • Date and time - will store date with time, for example 2017-01-01 12:33:21
    • Date only - will store only date, 2017-01-01
  • Number - field will contain numbers. You can choose subtype
    • Integer number - will store integer numbers only
    • Decimal number - will store decimal numbers
  • Text - field will contain string values. You have to choose maximal text length. For performance reasons it’s recommended to keep max text length below 255 characters.

Note: You can change type of field later. However you will loose all data stored in the field.

Editing values

You can change custom fields values in two ways

1. Directly from your backend forms

Custom fields will automatically appear in your prestashop backend forms.

customer custom field

2. From within DataKick module

You can use inline editing functionality to change values of custom fields. For your convenience there is an Assing values button on record overview page that will take you to a list containing all custom fields. This list is already in edit mode:

Changing custom field values

Example

Let’s use google taxonomy as a simple example. When you submit your product feed to google merchant center, it’s recommended to provide appropriate category from this list inside google_product_category tag.

To do this, you need somehow associate your categories, or products, with google category. Custom fields can be used for this task:

  1. create text custom field googleCategory in categories
  2. set field value for each category you export to google
  3. edit / create xml feed and use this custom field