RO CSVI

Fill multiple fields with one value

Requirements

  • CSVI 5.0+
  • VirtueMart 2.0.2
  • Joomla 2.5+
  • PHP 5.2+
  • An existing product import template
  • Basic understanding of adding fields to templates

Objective

The objective is to import 1 field from the import file into multiple destination fields. In this example we will import the product name into the fields product name and product short description.

Example data

"product_sku";"product_name"
"AB123";"Product 1"
"CD456";"Product 2"

Setting up the fields

Follow these steps to setup the fields as above:

Field configuration

  1. Select the product_sku field and click on Add
  2. Select the product_name field and click on Add
  3. Select the product_s_desc field and click on Add

Now we have all the three fields as shown in this image:

Import multiple destination fields

 

Configuring the additional destination fields

Now we need to set up the product short description to take the value from the product name as shown below:

Configure additional field

  1. On the Fields tab click on the product_s_desc field to open the edit screen as shown in the image above
  2. At File field name fill in the field name as set in the field you want to take the value from. In this example we take it from the product_name field. If this field is empty, add the same name as chosen at Template field name. As this field is empty in the product_name field, we add the full name product_name.
  3. At the Template field name select from which field the product short description should take its value. We want to take the value from the product_name field, so select the product_name field.
  4. Click on Submit

 

To make sure that the import uses these settings we just created the option Use column headers as configuration must be set to No. See the settings here:

Import settings combine fields

The settings are done and the file options are set now and the template is ready for import.