VirtueMart
Multiple Customfields Filter for VirtueMart
Background information
The ability to import custom field filter values and filter them using the Multiple Customfields Filter for Virtuemart.
Creating the custom field
Before you can start to import your filter values, you first need to create a custom field with a plugin of the VirtueMart2 multiple customfield plugin type. Take these steps to create the custom field:
- Click on Custom Fields in the left menu in the Products section
- Click on New
- Fill in the following fields:
- Custom Field Type: Plug-ins
- Title: Color (Remember this name as you will need it later in the CSV file)
- Published: Yes
- Parent: Don't change
- Cart Attribute: No
- Description: Change as you like
- Default: Don't change
- Tooltip: Don't change
- Layout position: Don't change
- Admin Only: No
- Is a list?: No
- Hidden: No
- Select a plug-in: VirtueMart2 multiple customfield plugin
- Click Save
- Go to the bottom of the page and notice there are some settings that can be set.

Set the Output template to multiselect-chosen.
For this example fill the parameters with:- Green
- Blue
- Yellow
- Pink
- Grey
- Click on Save & Close
- The Custom field has now been created
Creating the CSV file
An example CSV file for existing products looks like this:
"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price"
"10001";"Color";"param";"Blue#Pink#Grey";"Product with filter";"0";"100"
Let's have a closer look at the fields
product_sku
This is the unique code for a product.
custom_title
The name of the custom field. The correct name can be found on the Custom Fields page in VirtueMart in the column named Title. This is the name used in step 3.2 when creating the custom field.
custom_value
This must always be param.
custom_param
The custom_param fields holds all the values you want to assign to the product, each one separated by a #.
product_name
The name of the product.
product_in_stock
The number of products that there are in stock.
product_price
The price of the product. This field is required for the parent product otherwise the selections will not show up.
Multiple parameters
It is possible that you have multiple filter fields that you want to assign to a product, for example Color and Size. The CSV file looks like this:
"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price"
"10001";"Color~Size";"param~param";"Blue#Pink#Grey~M#L#S";"Product with filter";"0";"100"
If you have 2 custom titles, there must also be 2 custom values and 2 custom parameters.
Custom Fields For All for VirtueMart
Required fields
You must have the Custom Fields for All plugin for VirtueMart installed and the Custom Fields for All plugin for CSV Improved.
Background information
The ability to import custom field filter values and filter them using the Custom Fields For All. Please note custom fields for all fields are not available as individual template fields. They are grouped under custom_title, custom_value and custom_param fields so they are differentiated with standard VirtueMart custom fields.
Creating the custom field
Before you can start to import your values, you first need to create a custom field with a plugin of the Custom Fields For All plugin type. Take these steps to create the custom field:
- Click on Custom Fields in the left menu in the Products section
- Click on New
- Fill in the following fields:
- Custom Field Type: Plug-ins
- Title: CF4ALL (Remember this name as you will need it later in the CSV file)
- Show Title: Yes
- Published: Yes
- Parent: Don't change
- Cart Attribute: No
- Description: Change as you like
- Default: Don't change (Make sure this field is customfieldsforall)
- Tooltip: Don't change
- Layout position: Don't change
- Admin Only: No
- Is a list?: No
- Hidden: No
- Select a plug-in: Custom Fields for All plugin
- Click Save
- Go to the bottom of the page and notice there are some settings that can be set.

For this example fill the parameters with:
- Metal
- Plastic
- Wood
- Click on Save & Close
- The Custom field has now been created
Creating the CSV file
An example CSV file for existing products looks like this:
"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price";"product_parent_sku"
"10001";"CF4ALL";"customfieldsforall";"Wood";"Product with filter";"0";"100";""
"100011";"CF4ALL";"customfieldsforall";"Plastic";"First Child Product with filter";"1";"";"10001"
"100012";"CF4ALL";"customfieldsforall";"Metal";"Second Child Product with filter";"1";"";"10001"
Let's have a closer look at the fields
product_sku
This is the unique code for a product.
custom_title
The name of the custom field. The correct name can be found on the Custom Fields page in VirtueMart in the column named Title. This is the name used in step 3.2 when creating the custom field.
custom_value
This must always be customfieldsforall.
custom_param
The custom_param fields holds all the values you want to assign to the product.
product_name
The name of the product.
product_in_stock
The number of products that there are in stock.
product_price
The price of the product. This field is required for the parent product otherwise the selections will not show up.
product_parent_sku
The SKU of the parent product if it is a child product.
Results after import
After import the custom field values can be checked in VirtueMart Product edit page and on Custom fields tab.

Parameters with pricing
You can also add pricing to the custom fields if you have chosen for the price variant. The field custom_price must be added to the import file. The CSV file looks like this:
"product_sku";"custom_title";"custom_value";"custom_param";"custom_price";"product_name";"product_in_stock";"product_price";"product_parent_sku"
"10001";"CF4ALL";"customfieldsforall";"Wood";"9.99";"Product with filter";"0";"100";""
"100011";"CF4ALL";"customfieldsforall";"Metal";"9.99";"Child product with filter";"0";"";"10001"
Multiple parameters
It is possible that you have multiple filter fields that you want to assign to a product, for example Color and Size. The CSV file looks like this:
"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price";"product_parent_sku"
"10001";"Color~Size";"customfieldsforall~customfieldsforall";"Blue~M";"Product with filter";"0";"100"
"100011";"Color~Size";"customfieldsforall~customfieldsforall";"Red~L";"Child product with filter";"0";"100";"10001"
If you have 2 custom titles, there must also be 2 custom values and 2 custom parameters.
Results after import
After import the custom field values can be checked in VirtueMart Product edit page and on Custom fields tab.

For child product there is an option to inherit parent values. So child product gets its own values and an option to inherit parent values.

Multiple parameters with multiple values
It is possible that you have multiple filter fields that you want to assign to a product with multiple selected values for example Color and Size. The CSV file looks like this:
"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price";"product_parent_sku"
"10001";"Color~Size";"customfieldsforall~customfieldsforall";"Red#Blue~S#M";"Product with filter";"0";"100";""
"100011";"Color~Size";"customfieldsforall~customfieldsforall";"Green#Orange~L#XL";"Child product with filter";"0";"100";"10001"
If you have 2 custom titles, there must also be 2 custom values and 2 custom parameters.
Results after import
After import the custom field values can be checked in VirtueMart Product edit page and on Custom fields tab.


Multiple parameters with the same name
In case you want to assign the same custom field to one product but with different values you can do so by adding the custom_multiple field to your import file. The CSV file looks like this:
"product_sku";"custom_title";"custom_value";"custom_param";"custom_multiple";"product_name";"product_in_stock";"product_price";"product_parent_sku"
"10001";"CF4ALL~CF4ALL";"customfieldsforall~customfieldsforall";"Metal~Plastic";"Y~Y";"Product with filter";"0";"100";""
"100011";"CF4ALL~CF4ALL";"customfieldsforall~customfieldsforall";"Wood~Leather";"Y~Y";"Child product with filter";"0";"100";"10001"
Results after import
After import the custom field values can be checked in VirtueMart Product edit page and on Custom fields tab.


Override and Disabler
It is also possible to set the override and disabler values to the custom field on import.
To set override for a custom field use custom_override field. This field can take two values Y or N.
To set disabler for a custom field use custom_disabler field. This field can take two values Y or N.
An example content with custom_override field is
"product_sku";"custom_title";"custom_value";"custom_param";"custom_multiple";"product_name";"product_in_stock";"product_price";"product_parent_sku";"custom_override"
"10001";"CF4ALL~CF4ALL";"customfieldsforall~customfieldsforall";"Metal~Plastic";"Y~Y";"Product with filter";"0";"100";"";""
"100011";"CF4ALL~CF4ALL";"customfieldsforall~customfieldsforall";"Wood~Leather";"Y~Y";"Child product with filter";"0";"100";"10001";"Y~N"
Result after import

An example content with custom_disabler field is
"product_sku";"custom_title";"custom_value";"custom_param";"custom_multiple";"product_name";"product_in_stock";"product_price";"product_parent_sku";"custom_disabler"
"10001";"CF4ALL~CF4ALL";"customfieldsforall~customfieldsforall";"Metal~Plastic";"Y~Y";"Product with filter";"0";"100";"";""
"100011";"CF4ALL~CF4ALL";"customfieldsforall~customfieldsforall";"Wood~Leather";"Y~Y";"Child product with filter";"0";"100";"10001";"Y~N"
Result after import

Multi language import
Starting from 7.5.0 version CSVI has support for importing custom fields for all for multiple languages. The example content explains how to import custom fields for all for Dutch and Russian languages. Same format can be followed for other languages. Follow the below steps to import multi language custom fields.
- Make sure that you have needed languages installed in Joomla language manager
- Set the multiple languages in VirtueMart Configuration page.
- Create custom fields for Custom fields for all for Size and Color as explained above
- Update available fields in CSVI
- Run the import by setting custom values as in the below example content.
"product_sku";"custom_title";"custom_value";"custom_param";"product_name";"product_in_stock";"product_price";"custom_param_de_de";"custom_param_ru_ru"
"10001";"Color~Size";"customfieldsforall~customfieldsforall";"Red#Blue~S#M";"Product with filter";"0";"100";"Rood#Blauw~S#M";"красный#синий~S#M"
You can now check the imported values on VirtueMart Custom fields page.


The custom fields values can also be seen from VirtueMart Products page for the default language in Joomla. For example if the default language set in Joomla Language manager is Russian then the values imported in field custom_param_ru_ru can be seen in VirtueMart Products page and on Custom fields tab.

Export of Custom Fields For All
Custom fields for all fields can be exported in two ways. They can be added as individual template field or use custom_title, custom_value and custom_param field in your export template to get custom fields for all field values. These fields can be added as any other template field for export template. If you do not see the CF4ALL fields then update available fields.
Troubleshooting
When running the import of custom fields for all, if the values are not added to a product. Make sure that you have CSVI customfields for all plugin installed and enabled.
CSVI shows a message if the plugin is not installed in the debug log area on import.

More articles on this subject
Importing Multi Variant custom field
Recently VirtueMart introduced a new way of dealing with articles that can contain variants like clothes for example. They have named this custom field Multi Variant. Unlike a text field this is a pretty complicated custom field as it has many options.
CSVI deals with 2 settings:
- Ramifications
CSVI only supports the Use custom label option. - Values
The ramifications are for CSVI just field names and they are available as regular field names. By making the ramifications available as regular available fields the values become also regular values. There is one catch, the parent product must have two fields called multi_variant_title and multi_variant_fields. The multi_variant_title is the name of the Multi Variant custom field you created and the multi_variant_fields is the list of ramifications to use.
In this example we will use a t-shirt as our product to sell. Our t-shirt is available in the sizes S/M/L/XL and the colors Green/Blue/Red/Purple. Looking at our t-shirt we can already tell what our ramifications and values are. Let's break it down.
Ramifications
With our t-shirt we have 2 ramifications, they are Size and Color. In VirtueMart when you add a Multi Variant to a product you must specify the available options for each ramification, this is not needed for CSVI. CSVI will fill these in with the values found in your CSVI file. Create two string custom fields Size and Color from VirtueMart Custom fields page.


Values
As mentioned above we also know which values we want to use. The sizes are S/M/L/XL and the colors are Green/Blue/Red/Purple. We don't have to do anything with them now because CSVI will use them if they are found. Any value found will be used, so if your import file contains the size XXL and the color Yellow, this will be added as well.
Straighten out our products
Our t-shirt needs to be divided into the different combinations we have in stock. Let's say we have these t-shirts in stock:
| Size | Color |
| S | Green |
| M | Green |
| L | Green |
| S | Purple |
| M | Purple |
| L | Red |
| XL | Red |
| S | Blue |
So with these t-shirts in stock, we know which products we want to import. Now we need to give each product a unique code so we can identify which product the customer ordered.
| product_sku | product_parent_sku | Size | Color |
| SHIRT-S-GREEN | S | Green | |
| SHIRT-M-GREEN | SHIRT-S-GREEN | M | Green |
| SHIRT-L-GREEN | SHIRT-S-GREEN | L | Green |
| SHIRT-S-PURPLE | SHIRT-S-GREEN | S | Purple |
| SHIRT-M-PURPLE | SHIRT-S-GREEN | M | Purple |
| SHIRT-L-RED | SHIRT-S-GREEN | L | Red |
| SHIRT-XL-RED | SHIRT-S-GREEN | XL | Red |
| SHIRT-S-BLUE | SHIRT-S-GREEN | S | Blue |
Since SHIRT-S-GREEN is the first t-shirt, this also becomes the parent product. The rest of our t-shirts need to be linked to the parent product so we know it is a variation of that first t-shirt.
Prepare the CSV file
Now that we have a good overview of our t-shirts we can make the CSV file ready for import. The only missing pieces are the multi_variant_title and multi_variant_fields fields to tell CSVI which fields to use for the Multi Variant. For the multi_variant_fields each value is separated with a ~ symbol.

Please note that the multi_variant_title should be same as the title set for multi variant custom fields on Virtuemart custom fields interface. As per the above screenshot the title is Multi Variant which is given in the below CSV file.
Also multi_variant_fields would be the title of the ramifications, In this case it is Size and Color.
| product_sku | product_parent_sku | Size | Color | multi_variant_title | multi_variant_fields |
| SHIRT-S-GREEN | S | Green | Multi Variant | Size~Color | |
| SHIRT-M-GREEN | SHIRT-S-GREEN | M | Green | ||
| SHIRT-L-GREEN | SHIRT-S-GREEN | L | Green | ||
| SHIRT-S-PURPLE | SHIRT-S-GREEN | S | Purple | ||
| SHIRT-M-PURPLE | SHIRT-S-GREEN | M | Purple | ||
| SHIRT-L-RED | SHIRT-S-GREEN | L | Red | ||
| SHIRT-XL-RED | SHIRT-S-GREEN | XL | Red | ||
| SHIRT-S-BLUE | SHIRT-S-GREEN | S | Blue |
Once the import is done, Multi variant custom values can be checked from Virtuemart edit products page in virtuemart administrator interface and in custom fields tab.
Order of import
Import should be done twice for multi variants, First import will store the custom fields and the second import will import the custom fields. The order of import is:
- Import the parent products
- Import the child products or both the parents and the children
Instead of making 2 separate files with one for the parents and one for the children, you can use 1 file with both the parent and the children in there. This will generate a message saying there are unsupported fields, this is expected because the available fields have not yet been updated. This can be safely ignored, and on the second import, all will be fine.
Important
The Multi Variant custom field must already be created before you run the import, otherwise CSVI can't link the custom field to the product.

Use of noninheritable field
Starting from RO CSVI 8.14.0 version, we support use of noninheritable field for parent products in Multi Variants.
Sample CSV file for using noninheritable field
product_sku,product_parent_sku,published,Size,Color,multi_variant_title,multi_variant_fields,noninheritable
SHIRT-S-GREEN,,1,S,Green,Multi Variant,Size~Color,Y
SHIRT-M-GREEN,SHIRT-S-GREEN,1,M,Green
SHIRT-L-GREEN,SHIRT-S-GREEN,1,L,Green
SHIRT-S-PURPLE,SHIRT-S-GREEN,1,S,Purple
SHIRT-M-PURPLE,SHIRT-S-GREEN,1,M,Purple
With import of noninheritable field child products do not inherit parent values. Which means parent product should have the option to select values but child products should show only their assigned values and should not have an option to select parent or other child product values. See attached screenshot on how it looks on frontend.


Import VirtueMart images
Background information
To import images into VirtueMart there are a few things you need to know before hand. The default location of images in VirtueMart is images/stories/virtuemart/, from here images are grouped by their type e.g.:
- product
- category
- etc.
All product images reside in the folder images/stories/virtuemart/product. How does RO CSVI know where to locate your images? This is a combination of 2 settings:
- Path set in the template
- Name in the CSV file
On import RO CSVI combines these 2 settings to get the full path to the image. As an example the path in the template is set to images/stories/virtuemart/product and the file_url field in the CSV file is set to example.jpg. This will create a full path of images/stories/virtuemart/product/example.jpg. This is the correct path.
Preparing the template
Load the template you want to use for import. If you don't have a template yet, see the Create a template tutorial on how to create one.

Adding the fields
Your template might already have some fields, for the images we need to add 2 more fields:
- file_url
- file_url_thumb
Optional field (Available as of CSVI Pro 6.6.0)
- media_published
You can publish media files by using the media_published field with a value of Yes/yes/Y/y/1 to publish or No/no/N/n/0 to unpublish. If this field is not added in import, product's published field value will be taken else default value is 0, which is unpublish state.

Let's tell RO CSVI which fields you want to import.
- Under the Field name column, select the field file_url
- The other options we leave empty as they are fine
- Click on the Save or Save&Close button
- Repeat step 1 - 3 for the file_url_thumb

To make sure we don't lose anything, click on Save again to save your template.
Setting the template image options
The Image tab has a lot of options for managing your images. For now we will look at the general options. The most important option here is the Process images.
- Yes
This means that RO CSVI will perform all the image options set for example, create a thumbnail - No
This means that RO CSVI will not do any image processing.

We set the Process images to Yes and then configure the thumbnail settings because we want to let RO CSVI create a thumbnail.
![]()
To enable the thumbnail creation set the option Automatic thumbnail creation to Yes and if you want set the thumbnail size you would like.
Creating the import file
In your import file, you need to add 2 more columns:
- file_url
Here you put the name of the main image for example hammer.png. Multiple images separated by |. - file_url_thumb
Here you put the name of the thumbnail image, always prefixed by resized for example resized/hammer.png. Multiple images separated by |.
Let's create our CSV file:
"product_sku", "product_name", "category_path", "product_desc", "file_url", "file_url_thumb", "file_title", "file_description", "file_meta", "file_ordering"
"H01", "Hammer", "Hand Tool/Indoors", "A great hammer to let out all your frustration", "hammer.png", "resized/hammer.png", "Hammer", "A great hammer", "hammer,tool","1"
Save these 2 lines in a file or download the file by clicking here.
This completes the second step of the image path, we now have a complete path of images/stories/virtuemart/product/hammer.png
To be able to create a thumbnail upload an image called hammer.png to your server in the folder images/stories/virtuemart/product.
Import time
With our template configured and our file created, we are ready to import. Select the template from the import tab.

Click on Select File.

On the source option we will load the file from our computer. Click on Choose File and select your import file. Then click on the Preview button in the top right hand corner.

The list of fields in CSV would be shown as preview. Now click on Start import in the top right hand corner.
The result
When the import is done you will see a screen like this:

The final page shows that the processed file count and the name of the file with debug information. There you go, you have succesfully done a VirtueMart image import.
What's next?
The next thing you can do is, experiment. There are a lot of more features in RO CSVI you can use for example:
- Watermark images
- Store remote images on your server
- Resize large images
Troubleshooting
Even after succesful import if the images are not shown on VirtueMart backend, check the extension of the image. VirtueMart checks for image with extension as lowercase like .jpg or .gif. Make sure to change the case of your images and then import so VirtueMart can find the images.
Further reading
Other good sources of information are:
VirtueMart Manufacturers export
This tutorial explains how to create a VirtueMart Manufacturers export template, add the fields and how to run the export. Step by step we show you how to perform each task. A video will show you the steps in action so you can follow that as well.