RO CSVI

Article Index

RO CSVI special template fields

This document explains on how to use RO CSVI special template fields skip, combine and custom.

Along with template fields for each extension, RO CSVI also offers three special template fields for import and export. 

Import

  •    skip
  •    combine

Export

  • custom

skip template field

This field is used in case if an entire column has to be set to skip and not to be used in import. Consider if we have an import file with three columns like below

product_sku product_dimensions product_name
M001 XL Men clothes
WM001 XS  Women clothes

In the above import file, you do not want to import the second column product_dimensions and want to skip it completely. Use the skip template field as explained.

  1. Create import template for the needed operation and extension. Here we are using VirtueMart Product import so select component as VirtueMart, Operation as Product and action as Import.

  2. In Import template settings on File tab set Use file for configuration as No and save the template. This setting is to tell RO CSVI that if we are using column headers of import file as available fields or templates fields added to the import template as available fields. In this case setting to No will tell RO CSVI to use template fields as available fields. 

  3. In RO CSVI Template fields page select VirtueMart Product import template and add product_sku, skip and product_name as template fields. The second skip field tells RO CSVI to skip the complete second column in import file.

  4. Run the import.


combine template field

As the name says, this field is used to combine values with other template field values. One of the best example to explain the use of this field is explained with  below import file. Say we need to combine values of three columns category_path, subcategory1 and subcategory2 so to make it as one value for category_path. The second and third columns are set to combine template fields using RO CSVI Combine rule for the category_path to become Shoes/Women/Filpflops and Shoes/Men/Runners on import.

product_sku product_name category_path subcategory1 subcategory2
1001 Product 1 Shoes Women Flipflops
1002 Product 2 Shoes Men  Runners

 The steps to achieve this is explained below

  1. Create import template as VirtueMart Product import.  Select component as VirtueMart, Operation as Product and action as Import.

  2. In Import template settings on File tab set Use file for configuration as No and save the template. This setting is to tell RO CSVI that if we are using column headers of import file as available fields or templates fields added to the import template as available fields. In this case setting to No will tell RO CSVI to use template fields as available fields. 

  3. On RO CSVI rules page, create a new rule for RO CSVI Combine rule plugin. Set Source fields as category_path, combine, combine, Target field as category_path and combine character as /. Save the rule.

  4. In RO CSVI Template fields page select VirtueMart Product import template and add product_sku, product_name, category_path, combine, combine.

  5. Apply the rule on category_path field in RO CSVI Template fields page.

     

  6. Run the import and check the value of category_path field. If all set right on Import preview page we should see the value of category_path as Shoes/Women/Filpflops and Shoes/Men/Runners.


custom template field

RO CSVI offers one special field for export. This field is mostly used in places where extra information to be exported.

Say if you want to export current date in export file, add the custom as template field, set a Column header like Today's date, set the date format and save the template field.

 

Another example to use this field is when we need an extra column in export with one value to all rows like say we want to export In Stock as stock status for all products. Set In Stock as default value in template field.