Requirements
- CSVI 6.0+
- Joomla 3.0+
- VirtueMart 3.0 or higher
- PHP 5.4
Background information
To import/export custom fields CSVI uses the Custom field import and Custom field export operations. These operations are available after choosing Import or Export -> VirtueMart under Options.
Required fields
The custom fields import requires the following fields:
- plugin_name
- custom_element
- custom_title
- custom_value
- field_type
Optional but recommended fields
- custom_field_desc
An example CSV file looks like this:
"plugin_name";"custom_element";"custom_title";"custom_value";"field_type"
"Customer text input";"textinput";"CSVI Import";"Type here";"E"
Let's have a closer look at the fields.
plugin_name
This field contains the name of the plugin that is used for the custom field. A list of supported plugins can be found in the Plug-in Manager: Plug-ins section. The Plug-in Name you see here is what needs to be put in the plugin_name field.
custom_element
This is a bit of an odd one. The custom_element you can find in the field called Default when you save the custom field when the Field Type is set to Plugins. When using another field type, this field is left empty.
custom_title
The name of the custom field.
custom_value
This is the same value as custom_element when importing a plugin field type. In any other case this is a text shown to the shopper.
field_type
This must be one of the following values, depending on the type of custom field you are importing:
- S: String
- I: Integer
- P: Parent
- B: Boolean
- D: Date
- T: Time
- M: Image
- V: Cart variant
- E: Plugins
custom_field_desc
A description of the custom field.
Once you have created the CSV file with the necessary data it can be imported like any other import.