Predefined order contact fields:
- fio - contact person
- firm - organization
- phone - contact phone
- email - contact e-mail
- comments - order comments
Add contact field
Go to Order contact field manager: Joomla admin panel->Components->IPrice minimart->Order contact fields, then click tool button "New".
Contact field properties:
- System field name - the system offers the default random generated system name. The best way is to set your own name with prefix 'irpice_'. Use a-z symbols only for system field name. You can not change the system name. Afterwards, you can not edit system name, so set the system name of the field as possible understandable.
- Caption - set the caption for contact field. Caption will be displayed in order contact info.
- Field type - select field type. Available field types:
- Text - simple text field.
- Multiline text - multiline text field.
- Yes/No - Yes/No radio buttons.
- Checkbox - single checkbox.
- Select list - select list of values. You can set list of values using property "Field content".
- Date (dd.mm.yyyy) - date with format 'dd.mm.yyyy'.
- Date (mm/dd/yyyy) - date with format 'mm/dd/yyyy'.
- Email - text field with e-mail format.
- Phone number - text field with phone number format.
- Divider - divider of field blocks
- Field content
- for field type 'Select list': you can set values of select list separated by semicolon using this property, for example: Russia;German;France. Use semicolon first if you need to add empty value first, for example: ;Russia;German;France
- for field type 'Checkbox': you can set additional caption for checkbox using this property. This caption will be displayed to the right of checkbox. You can use HTML code for additional checkbox caption.
- Required - Field is mandatory if 'Yes'.
- Published - set published or not. You can disable field without deleting, just set 'published' to 'No'.
- Ordering - order of the field.
- Minimum length (for text field) - set minimum length (in charactrers) for text field if you need minumum length restriction.
- Field length - field length to display in contact info.
- Error message if field validation fails - set this property if you need custom error message for the field. Standard error message 'Enter the correct data to the field "FIELD"' will apear If you do not specify custom error message.
- CSS class name - class name for INPUT tag of the field. 'inputbox' By default.
- Include to bill customer data - field will be included to PDF bill customer data if 'Yes'.
- Include to order - if 'No', then field will be not included to an order.
- Tab name - Field will be placed to the tab with tab name if you specify tab name. You should specify the same tab name for fields if you need to place these fields to the same tab.
- Show bellow tabs - if 'Yes', the field will be placed bellow tabs (if tabs exists). If 'No', the field will be placed above tabs (if tabs exists).
- Field name of Community Builder user profile - integration with Communuty builder. You can set CB user field name in this property. In this case, the field will have the value from the field of CB user profile when user go to checkout page. You need Community Builder installed for using this property. Also you need to set parameter "Integration with Community Builder" in section "Basic parameters" of global component patameters.
Edit contact field
Go to Order contact field manager: Joomla admin panel->Components->IPrice minimart->Order contact fields. Click to system field name to edit field. You can not change system field name when editing. Also you can not remove predefined field 'e-mail'.
Validation of user data
User data will be validated when user click "Send order" on checkout page.
Validations for types:
- Text -value can not be empty, if field is required. Value length can not be shorter than minimal field length.
- Multiline text - value can not be empty, if field is required.
- Yes/No - button must be selected either "yes" or "No".
- Checkbox - Checkbox must be checked, if field is required.
- Select list - value must be selected, if field is required.
- Date (dd.mm.yyyy) - value can not be empty, if field is required. Value should match with format 'dd.mm.yyyy'.
- Date (mm/dd/yyyy) - value can not be empty, if field is required. Value should match with format 'mm/dd/yyyy'.
- Phone number - value can not be empty, if field is required. Value should match with format phone number: '0-9','+','-','(',')','space' symbols only.
Example 1For example, you need to add contact field 'Gender' with values 'male' and 'female'. Field is required. The field must contain a null value by default, to force the user to select a value.
Pic 1 shows how to configure such field:
Pic 1. Example of contact field 'Gender'
You need to add checkbox "I agree with user agreement". User should check it before sending order. The caption of checkbox must includes the link to license agreement.
Pic 2 shows how to configure such field:
Pic 2. Example of contact field 'License agreement'