VirtueMart

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 ...

Shipment method

| VirtueMart

Shipment method

VirtueMartCSVI ImportCSVI Export
Shipment Name shipment_name shipment_name
Published published published
Shipment Description shipment_desc shipment_desc
Shipment Method shipment_element shipment_element
Shopper Group virtuemart_shoppergroup_id virtuemart_shoppergroup_id
List Order ordering ordering

Read more ...

Import Generic child variant for VirtueMart

| VirtueMart

Generic child variant for VirtueMart would help you to show products with different size settings keeping one product as a base which would be the parent product. All you need to do is create generic child variant custom field type in VirtueMart and link it among your products. Generic variant is a individual product by itself so it has its own description, images and details as how a normal product would do.

Read more ...

VirtueMart Prices import

| VirtueMart

A template can be created by following these steps:

  1. Go to Components -> RO CSVI -> Templates
  2. Click New
  3. Give the template a name, say for example VirtueMart Price import
  4. Set Action to Import
  5. Set Component to VirtueMart
  6. Set Operation to Price
  7. Click Next: Select Source
  8. Source is set default to Load from your computer. No need for change.
  9. Click Next: Select options
  10. The default values are OK, change if needed.
  11. Click Next: Select fields
  12. Nothing needed here as we set to Use column headers as configuration in step 10.
  13. Click Next: Finalize
  14. All done here
  15. Click Close to return to the list of templates or Edit if you want to fine-tune the template further.

VirtueMart Prices import create template

  1. Go to Components -> RO CSVI  -> Templates
  2. Click on Template fields
  3. In the Search Tools select your template
  4. Click on New to add a single field or click on Quick Add to add multiple fields.

Quick Add

The Quick Add Option allows you to quickly add multiple fields to a template. It is not possible to set any settings per field here but that can be done after the fields have been added to the template.

VirtueMart price import create template fields

  • product_sku
  • shopper_group_name
  • product_currency
  • price_quantity_start
  • price_quantity_end
  • product_price

The import can be run by following these steps:

  1. Go to Components -> RO CSVI -> Import
  2. Select the template created earlier with name VirtueMart price import
  3. Click Select file
  4. Select the file to import
  5. Click Preview
  6. You now see a preview of the file as to how CSVI sees the file
  7. Click Start import
  8. The import is run
  9. The Log details page will be shown with information regarding the import if the Enable logging is enabled in the template

VirtueMart price import process

Example fields to update shopper group
"product_sku";"shopper_group_name";"shopper_group_name_new";"product_currency";"price_quantity_start";"price_quantity_end";"product_price"
"H01";"-default-";"Gold Level";"EUR";"1";"10";"20"
"H01";"-default-";"Gold Level";"EUR";"11";"21";"18" "H01";"Gold Level";"*";"EUR";"0";"0";"18"

Example fields to update price
"product_sku";"shopper_group_name";"product_currency";"price_quantity_start";"price_quantity_end";"product_price";"product_price_new"
"H01";"-default-";"EUR";"1";"10";"20";"22.50"
"H01";"-default-";"EUR";"11";"21";"18";"19,50"
"H01";"Gold Level";"EUR";"0";"0";"18";"19"

To delete a price of a product add field price_delete and set the value to Y. CSVI will then delete the price during import.
Delete a price
"product_sku";"shopper_group_name";"product_currency";"price_quantity_start";"price_quantity_end";"product_price";"price_delete"
"H01";"-default-";"EUR";"1";"10";"20";"Y"
"H01";"Gold Level";"EUR";"0";"0";"18";"Y"

virtuemart_price_import.csv

Read more ...

VirtueMart Prices export

| VirtueMart

A template can be created by following these steps:

  1. Go to Components -> RO CSVI  -> Templates
  2. Click New
  3. Give the template a name
  4. Set Action to Export
  5. Set Component to VirtueMart
  6. Set Operation to Price
  7. Click Next: Select Source
  8. Destination is set default to Download. No need for change.
  9. Click Next: Select options
  10. The default values are OK, change if needed.
  11. Click Next: Select fields
  12. Fields must be added otherwise there is nothing for CSVI to export. Click Edit template fields.
  13. A new window opens with the Template fields page. You can add new fields by clicking New or Quick Add.
  14. When all fields are added you can close the window
  15. Click Next: Finalize
  16. All done here
  17. Click Close to return to the list of templates or Edit if you want to fine-tune the template further.

VirtueMart price export create template

  • Go to Components -> RO CSVI -> Templates
  • Click on Template fields
  • In the Search Tools select your template
  • Click on New to add a single field or click on Quick Add to add multiple fields.

Quick Add

The Quick Add Option allows you to quickly add multiple fields to a template. It is not possible to set any settings per field here but that can be done after the fields have been added to the template.

VirtueMart price export create template fields

  • Go to Components -> RO CSVI -> Export
  • Select the template created earlier
  • Click Export
  • The export is run
  • The Log details page will be shown with information regarding the export if the Enable logging is enabled in the template

VirtueMart price run export

Read more ...