RO CSVI
Missing fields in RO CSVI
| RO CSVI
Every import and export in RO CSVI works based on fields associated to a specific import or export. The fields tell RO CSVI what kind of information is being processed.
An overview of the fields can be found by going to Maintenance -> Available Fields. It can happen that fields are missing, the list will needs to be updated. There are 2 reasons why fields can go missing:
- The list of available fields is not up-to-date
- The list of tasks is not up-to-date
The tasks and available fields are closely related because each task contains a list of available fields. All tasks together make up the full list of available fields.
In case RO CSVI supports any custom fields created by the extension you use, it is necessary to update the available fields in CSVI as well after the custom fields have been created. Otherwise RO CSVI doesn't know about the custom fields and thus they can't be used.
Updating the tasks
To update the tasks, follow these steps:
- Go to Maintenance -> Tasks in the menu

- Click on Reset to reset the tasks. You do not need to select any tasks. The reset will reset all tasks found in the system.

- The system will ask you if you are sure, confirm by clicking the Reset button.

- The tasks are now reset.
Updating the available fields
To update the available fields, follow these steps:
- Go to Maintenance -> Available fields in the menu

- Click on Update to start the update of the available fields

- RO CSVI will start to update the available fields
Conclusion
After the tasks and available fields have been updated they can be used for import and export.
Margin plugin
| RO CSVI
The Margin plugin let's you set a margin to the product price (for example) and imports the new price according to the value set.
From Components -> RO CSVI ->Templates tab -> Rules, Click New to add a new rule for margin plugin.
For example to create a rule to set 20% margin for product_price field of a virtuemart product.
- Give a Descriptive name for the rule in name field.
- Select Action as Import.
- Select Plugin as RO CSVI margin.
- Click on load plugin button.
You will now see three new fields appears
- Value type field to select how the margin is calculated either percentage or value.
- Margin field to set how much percentage or value to be added, For example here its 20.
- Operation type used to calculate the margin.
Example
Here is an example on how to create a rule using margin plugin for a product_price field in virtuemart.
Explanation on the fields
Value type
Take the percentage of value or the value itself.
Margin
Value to be taken for percentage, with the example in the above screenshot, 20% is taken as margin.
Operation
The type of arithmetic operation to be used for calculating the margin. This example uses Multiplication. So for 100 as product_price, margin as 20% with the rule applied, final product_price would be 120 on import.
Comparison Operator
Compare product_price value before applying the margin.
Product price value
The value to compare product_price with. With the above settings in the screenshot, product_price is compared if it is greater than 100 before applying the margin.
Decimals
The number of decimals to be taken after the margin calculation. In this case 4 decimals are taken.
Now set this rule to template fields to use the margin plugin like below
When the fields are set with rules you can see a small fire icon next to the field name in Template fields tab.
Important Note :
- Make sure that product_price (example used in this template) are added in template fields list.
- Use file for configuration option in templates->template name->file tab set to No.

Now that all rules and fields are set, CSVI will automatically calculate the product_price according to the new margin set. Say here for an example the product_price in CSV file has been given as 100. While import CSVI will calculate the price and show as below.

Field copy plugin
| RO CSVI
The Field copy plugin let's you copy a field value to another without creating columns to repeat the values during import.
From Components -> CSVI pro ->Templates tab -> Rules, Click New to add a new rule using field copy plugin.

For example to create a rule to copy product_desc to product_s_desc field for a virtuemart product.
- Give a meaningful name for the rule in name field say "Virtuemart field copy product"
- Select Action as Import
- Select Plugin as CSVI field copy
- Click on load plugin button
You will now see two new fields appears
Source field
The source field is the field that CSVI needs to copy from. The names to fill in here come from the template fields page. The source fieldnames must be the names that are found in the Field name column on the template fields page.
Target field
The target field is the one where CSVI needs to copy to. Same as the source field even this field has to come from the template fields page. This must always be a name found in the Field name column.
Example
Here is an example on how to create a rule for a field copy plugin.

Now set this rule to template fields to use the field copy plugin like below

When the fields are set with rules you can see a small fire icon next to the field name in Template fields tab.

Important Note :
- Make sure that both product_desc and product_s_desc (examples used in this template) are there in template fields list to use the field copy plugin.
- Use file for configuration option in templates->template name->file tab set to No.

Now that all rules and fields are set, CSVI will automatically copy the value from product_desc (source field) to product_s_desc (target field).
Backup/Restore Templates
| RO CSVI
Backup and Restore templates
Requirements
- CSVI 6.0+
- Joomla 2.5+
- PHP 5.2+
Backup Templates
CSVI provides an option of backing up your templates and restore them whenever needed. It can be done from maintainence tab, select the templates needs to be backedup and the folder path where file has to be stored, click on continue on top corner.

Once the Process is completed, CSVI would notify the message with the number of templates and the log information. The path and the name of the backup file name is also displayed with the message.
An example of backup file can be seen clicking here
Restore Templates
CSVI provides an option of restoring the templates using the file created on backup process. This helps in saving the time of creating templates again when needed. This can be accomplished using maintainence tab. Choose the XML file generated in backup process and click on continue on top corner

Once the process is complete, CSVI would notify the number of templates restored.

Troubleshooting export errors
| RO CSVI
Often when we export files we run into errors. Where to start looking for the cause of the issue and how to solve this?
Checkpoints
Follow these checkpoints to make sure that you have the basics right.
- Up-to-date Available Fields
The list of available fields should be up-to-date before importing starts. If the field list is not up-to-date the import may fail due to missing fields. To update the list of available fields go to Maintenance -> Available Fields -> Click Update - Template enabled
If a template does not show up in the list of templates to export, the template is not enabled. Go to Templates -> Templates, find your template and click on the icon in the Enabled column or select the template and click Publish in the toolbar. - Template fields enabled
The export file is empty, this can happen when the template fields are not published. Go to Templates -> Template fields, find your template and check if the fields are enabled. - Export folder writable
CSVI writes the export data temporarily to a file on the server before it is further processed. The file is placed in the folder tmp/com_csvi/export. The webserver needs to have write access to this folder. - Duplicates in the export file
It can happen that the export file contains duplicates, this happens because of the selection that needs to be made to export all the requested fields. The solution to this is to group based on the duplicate fields. This can be done on the fields page of the template.