VirtueMart

VirtueMart Shipping Rates import with RO CSVI

| VirtueMart

This tutorial explains how to create a VirtueMart Shipping rates import template, add the fields and how to run the import. 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.

Read more ...

Shipment method Configuration

| VirtueMart

Shipment method configuration

VirtueMartCSVI ImportCSVI Export
Logo shipment_logos shipment_logos
Countries countries countries
ZIP range start zip_start zip_start
Zip range end zip_stop zip_stop
Lowest Weight weight_start weight_start
Highest Weight weight_stop weight_stop
Weight Unit weight_unit weight_unit
Minimum number of products nbproducts_start nbproducts_start
Maximum number of products nbproducts_stop nbproducts_stop
Minimum order amount orderamount_start orderamount_start
Maximum order amount orderamount_stop orderamount_stop
Shipment Cost cost cost
Package Fee package_fee package_fee
Tax tax_id
tax

tax_id
tax

Minimum Amount for Free Shipment free_shipment free_shipment

Read more ...

Import manufacturers in a multi-lingual VirtueMart shop

| VirtueMart

Objective

The objective is to import Dutch manufacturer names into an English setup multi-lingual shop. The English manufacturers have already been imported.

Example data

"mf_name";"mf_name_trans"
"Dutch manufacturer 1";"English manufacturer 1"
"Dutch manufacturer 2";"English manufacturer 2"

 

Setting up the template

To import manufacturers in a multi-lingual shop, we need to setup the template first. Follow these steps:

  1. Select the Manufacturer import options and click on Go

    manufacturer import choice

  2. Set the import settings

    manufacturer import settings

  3. Set the language options. The shop uses English as the main language so the Language is set to English. Dutch is an additional language and we are importing this, so we set Translated Language to Dutch

    manufacturer import language

Import the file

Now that the template is set, you can select the file you want to import and click Import. After that you can check the manufacturer names in VirtueMart.

Read more ...

Stockable variants import

| VirtueMart

Required fields

Stockable Custom Fields plugin by Break Design and the RO CSVI - VirtueMart - Breakdesigns extension by RO CSVI (available from the Extension Downloads)

Background information

The ability to import stockable variants make it easier than using the interface in VirtueMart

Creating the custom field

Before you can start to import your stockable variants, you first need to create a custom field needed for import. As per the example below we are going to import two custom fields Size and Color. So lets start adding these custom fields from VirtuMart custom fields page.

Add Size custom field by following the below steps

  1. Click on Custom Fields in the left menu in the Products section in VirtueMart
  2. Click on New
  3. Fill in the following fields:
    1. Custom Field Type: String
    2. Title: Size
    3. Published: Yes
    4. Layout position: Don't change
    5. Admin Only: No
    6. Is a list?: No
    7. You Hidden: No
  4. Click on Save & Close
  5. The Size custom field has now been created

csvi scf size string custom field

Add Color custom field by following the below steps

  1. Click on Custom Fields in the left menu in the Products section in VirtueMart
  2. Click on New
  3. Fill in the following fields:
    1. Custom Field Type: String
    2. Title: Color
    3. Published: Yes
    4. Layout position: Don't change
    5. Admin Only: No
    6. Is a list?: No
    7. Hidden: No
  4. Click on Save & Close
  5. The Color custom field has now been created

csvi scf color string custom field

Now add another custom field of Stockable Variant type Size and Color and add the above added string custom fields to this custom field. Take these steps to create the custom field:

  1. Click on Custom Fields in the left menu in the Products section
  2. Click on New
  3. Fill in the following fields:
    1. Custom FIeld Type: Plug-ins
    2. Title: Size and Color (Remember this name as you will need it later in the CSV file)
    3. Published: Yes
    4. Parent: Don't change
    5. Cart Attribute: Yes
    6. Cart Input: Yes
    7. Description: Don't change
    8. Default: Make sure this field has value stockablecustomfields
    9. Tooltip: Don't change
    10. Layout position: Don't change
    11. Admin Only: No
    12. Is a list?: No
    13. Hidden: No
    14. Select a plug-in: Stockable Customfields
    15. Click Save
  4. Go to the bottom of the page and notice there a few more options. Here you add one or more existing custom fields.
    VirtueMart Stockable customfields
  5. Click on Save & Close
  6. The Custom field has now been created

Creating the CSV file

An example CSV file for existing products looks like this:

"product_sku","product_parent_sku","custom_title","custom_value","custom_multiple","product_name","product_price"
"10001","","Size and Color~Size and Color~Size and Color","stockablecustomfields~stockablecustomfields~stockablecustomfields","Y~Y~Y","Parent product","123"
"10001brbl","10001","Size~Color","M~Green",,"Child Medium Green",
"10001brge","10001","Size~Color","L~Red",,"Child Large Red",
"10001bror","10001","Size~Color","XL~Orange",,"Child Extra Large Orange",

Let's have a closer look at the fields

product_sku

This is the unique code for a product.

product_parent_sku

This is the SKU of the parent 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.1 when creating the custom field.

custom_value

Parent product

This must always be stockablecustomfields for the parent product, as many times as there are child products. Each value separated with the ~-symbol.

Child product

The child products contain the values of the actual field. Each value separated with the ~-symbol. In this case we added 2 fields, Size and Color to the stockable customfield, so each child product gets two values.

custom_multiple

This is only needed for the parent product and is always Y, as many times as there are child products. Each value separated with the ~-symbol.

product_name

The name of the product.

product_price

The price of the product. This field is required for the parent product otherwise the selections will not show up.

Results after import

On VirtueMart Product edit page on Custom fields tab check the results for parent product as shown in images below

Parent product as derived

To set parent as derived

  1. In VirtueMart custom fields page for Stockable custom field set Parent Product Orderable as Yes. Save the custom field. 

  2. In import file add product_as_derived field and for parent product row set value as 1.

An example CSV file with parent product set to derived:

"product_sku","product_parent_sku","custom_title","custom_value","custom_multiple","product_name","product_price","product_as_derived","custom_parent_title","custom_parent_value"
"10001","","Size and Color~Size and Color~Size and Color","stockablecustomfields~stockablecustomfields~stockablecustomfields","Y~Y~Y","Parent product","123",1,"Size~Color","XS~Red"
"10001brbl","10001","Size~Color","M~Green",,"Child Medium Green",,,
"10001brge","10001","Size~Color","L~Red",,"Child Large Red",,,
"10001bror","10001","Size~Color","XL~Orange",,"Child Extra Large Orange",,,

 You can also set parent product as a variant by setting parent product as derived. Use fields custom_parent_title and custom_parent_value to set value to parent product along with product_as_derived field set to 1.The main use of setting parent product as derived is that there is a variation selected once user visits the product details page.

Results after import

 

Custom fields for all with Stockable custom fields

The Size and Color custom fields shown above is of custom type String, CSVI also supports customfieldsforall custom fields type in Stockable custom fields.  The procedure is same as above, add a customfieldsforall field in VirtueMart custom fields page and add the field to Stockable custom fields custom field.

Add Format custom field of type Custom fields for all by following the below steps

  1. Click on Custom Fields in the left menu in the Products section in VirtueMart
  2. Click on New
  3. Fill in the following fields:
    1. Custom Field Type: Plug-ins
    2. Title: Format
    3. Published: Yes
    4. Parent: Don't change
    5. Description: Don't change
    6. Default: Don't change
    7. Tooltip: Don't change
    8. Layout position: Don't change
    9. Admin Only: No
    10. Is a list?: No
    11. Hidden: No
    12. Select a plug-in: Custom fields for all
    13. Click Save
  4. Click on Save & Close
  5. The Custom field for custom fields for all has now been created
  6. csvi scf cf4all custom field

  7. Add the custom fields for all custom field to Stockable custom field Size and Color.
    VirtueMart CF4ALL customfields
"product_sku","product_parent_sku","custom_title","custom_value","custom_multiple","product_name","product_price"
"10001","","Size and Color~Size and Color~Size and Color","stockablecustomfields~stockablecustomfields~stockablecustomfields","Y~Y~Y","Parent product","123"
"10001brbl","10001","Size~Color~Format","M~Green~Skirt",,"Child Medium Green",
"10001brge","10001","Size~Color~Format","L~Red~Dress",,"Child Large Red",
"10001bror","10001","Size~Color~Format","XL~Orange~Shirt",,"Child Extra Large Orange",

Results after import

On VirtueMart Product edit page on Custom fields tab check the results for parent product as shown in images below

 Some important notes

  • Only a parent product can be used to import stockable information

It is also possible to import customfieldsforall with stockablecustomfields in one import file with proper use of custom fields. An example would be like below

"product_sku";"product_parent_sku";"custom_title";"custom_value";"custom_multiple";"custom_param";"product_name";"product_in_stock";"product_price"
"10001";"";"Type~Material~Size and Color~Size and Color~Size and Color";"customfieldsforall~customfieldsforall~stockablecustomfields~stockablecustomfields~stockablecustomfields";"~~Y~Y~Y";"Semi soft~Plastic";"Product with filter";"0";"100"
"10001brbl";"10001";"Type~Material~Size~Color";"customfieldsforall~customfieldsforall~M~Green";"";"Soft~Foam";"Child Medium Green";
"10001brge";"10001";"Type~Material~Size~Color";"customfieldsforall~customfieldsforall~L~Red";"";"Hard~Metal";"Child Medium Red";
"10001bror";"10001";"Size~Color";"XL~Orange";"";"";"Child Extra Large Orange";

More articles on this subject

Read more ...

Import VirtueMart images

| VirtueMart

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:

  1. Path set in the template
  2. 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.

csvi6 select import template


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.

  1. Under the Field name column, select the field file_url
  2. The other options we leave empty as they are fine
  3. Click on the Save or Save&Close button
  4. 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:

Read more ...