In backoffice we can set additional data which will be available on customer card or registration form depending on settings. In addition, we can manage whether the data will be visible in eshop or backoffice.
To set additional fields, you have to:
- Log in to Administration Panel
- Go to "Settings" cart in "Configurations" tab
- Go to "Additional information" tab
Here we can use JSON to define additional text fields, their types and visibility.
Additional fields visibility options:
- frontend-registration - if you want to add class for the input field or for field name you should use "inputClasss" or "labelClass" e.g.""metadata": {
"frontend": [
{
"vid": "fieldName",
"container": {
"inputClass": "col-md-5",
"labelClass": "col-md-4"
}
}
]
},
Field will be visible on registration form on eshop.
- frontend-client-data
Data will be visible in "Billing" tab of customer account in Eshop
- backoffice-registration
Field will be visible on registration form on backoffice.
Types of additional fields
- Radio
{
"ExampleOfRadioField": {
"type": "radio",
"label": "City",
"rules": "",
"value": 2,
"options": [
{
"text": "Wrocław",
"value": "1"
},
{
"text": "Kiev",
"value": "2"
},
{
"text": "New York",
"value": "3"
}
],
"visible": [
"frontend-registration",
"backoffice-registration",
"frontend-client-data"
]
}
}
- Text
{
"PayerName": {
"type": "text",
"label": "Payer name",
"visible": [
"frontend-registration",
"backoffice-registration",
"frontend-client-data"
]
}
}
- Select
"branch_list": {
"type": "select",
"label": "Branches",
"rules": {
"required": false
},
"value": 2,
"options": [
{
"text": "Wrocław",
"value": 1
},
{
"text": "Poznań",
"value": 2
},
{
"text": "Warszawa",
"value": 3
}
],
"visible": [
"frontend-registration",
"backoffice-registration",
"frontend-client-data"
]
}
- Checkbox
{
"checkbox": {
"type": "checkbox",
"label": "Want to be informed about promotions?",
"rules": "",
"visible": [
"frontend-registration",
"backoffice-registration",
"backoffice-client-data",
"frontend-client-data"
]
}
}
Additional rules of field
Using rules, you can add additional requirements to fields such as word length, numeric numbers only, and whether the field is required.
{
"regon": {
"type": "text",
"label": "Additional Number",
"rules": {
"max": 9,
"min": 4,
"regex": "",
"numeric": true,
"required": true
},
"value": "",
"visible": [
"frontend-registration",
"backoffice-registration",
"frontend-client-data"
]
}
}
Comments
0 comments
Please sign in to leave a comment.