Requirements: CSVI 5.6+
In CSVI Pro it is possible to add your own custom available fields without having to modify any core files.
Adding fields
Steps to add your own available fields:
- Go to the folder administrator/templates/<template name>/html/com_csvi/<component name>/install/
For example: administrator/templates/isis/html/com_csvi/com_virtuemart/install/ - Create a file called override.sql
- Add the following code in the file:
INSERT IGNORE INTO `#__csvi_availablefields` (`csvi_name`, `component_name`, `component_table`, `component`, `action`) VALUES
('skip', 'skip', 'product', 'com_virtuemart', 'import');
Explanation of the fields:- csvi_name
This is the name of the field used by CSVI (this is usually the same as the component_name) - component_name
The name of the field used in the component table - component_table
The name of the import/export routine where the field is to be used with - component
The name of the component the field is used for
- csvi_name
- Add more lines if needed
- Run the Update from the Available Fields to add your custom available fields
A file with multiple lines could look like this:
INSERT IGNORE INTO `#__csvi_availablefields` (`csvi_name`, `component_name`, `component_table`, `component`, `action`) VALUES
('skip', 'skip', 'product', 'com_virtuemart', 'import'),
('combine', 'combine', 'product', 'com_virtuemart', 'import');
Processing fields
To have CSVI process these custom available fields, you will need to write your own code.