VirtueMart

VirtueMart Categories and Product order import

| VirtueMart

A template can be created by following these steps:

  1. Go to Components -> CSVI Pro -> Templates
  2. Click New
  3. Give the template a name, say for example VirtueMart Product import
  4. Set Action to Import
  5. Set Component to VirtueMart
  6. Set Operation to Product
  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 categories and product ordering import create template

  1. Go to Components -> CSVI Pro -> 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 categories and product ordering import create template fields

  1. Go to Components -> CSVI Pro -> Import
  2. Select the template created earlier with name VirtueMart product 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 categories and product ordering run import

Read more ...

VirtueMart Product Pricing Fields

| VirtueMart

This page shows which VirtueMart Product Pricing fields you can use for import and export.

Read more ...

VirtueMart Calculation Rules import

| VirtueMart

This VirtueMart Calculation Rules import tutorial explains how to import calculation rules into VirtueMart using RO CSVI.

Read more ...

Setting up a VirtueMart multi-language shop

| VirtueMart

To setup and maintain a multi-language site in VirtueMart 2 requires planning and care.

Before you start

There are a few things that needs to be done before you can start with a multi-language site. These things are:

  1. Which languages do I want to use?
    The first thing to do is decide which languages you are going to use and install them in your site so they become available to VirtueMart and CSVI.
  2. Which language is my primary language?
    This is a very important decision as all translations will be based off this language.
  3. Configure VirtueMart
    In VirtueMart you need to configure which languages you are going to use

In this document we will use English and Dutch as our languages where English is our primary language.

Configure VirtueMart

Now that we know we will use English and Dutch we will tell VirtueMart we want to use them. Go to Configuration in VirtueMart:

VirtueMart Configuration option

and set the lanugages in the Languages Options:

vm language settings

with the languages set click on Save & Close to store the settings.

Preparing Language Data

VirtueMart contains a few areas that are affected by multi-language settings, these areas are:

  • Categories
  • Manufacturers
  • Manufacturer categories
  • Products
  • Payment methods
  • Shipment methods
  • Vendors

In this tutorial we will be setting up these areas as they are the most common to import for a multi-language site:

  • Categories
  • Manufactuers
  • Products

Categories

To import the categories in English and Dutch we are going to need 2 files:

  • The primary language file
  • The translations file
    One translation file per language is needed. In this case we add Dutch so we have 1 translation file. If you also have German and Italian, you will have a total of 3 translation files: Dutch, German and Italian.

Primary language file

The primary language file contains the category data you want to import. The primary language file can look like this:

"category_path";"published"
"Power Tools/Outdoor Tools";"1"
"Power Tools/Indoor Tools";"1"
"Garden Tools";"1"

Translation language file

The translation language file contains only the translation of the category information. A translation is indicated by adding _trans to the field name, this gives us the field name category_path_trans.

The translation language file can look like this:

"category_path";"category_path_trans"
"Power Tools/Outdoor Tools";"Elektrisch gereedschap/Buitenshuis"
"Power Tools/Indoor Tools";"Elektrisch gereedschap/Binnenshuis"
"Garden Tools";"Tuingereedschap"

Manufacturers

To import the manufacturers in English and Dutch we are going to need 2 files:

  • The primary language file
  • The translations file
    One translation file per language is needed. In this case we add Dutch so we have 1 translation file. If you also have German and Italian, you will have a total of 3 translation files: Dutch, German and Italian.

Primary language file

The primary language file contains the manufacturer data you want to import. The primary language file can look like this:

"mf_name";"published"
"Apple";"1"
"Samsung";"1"
"Nokia";"1"

Translation language file

The translation language file contains only the translation of the manufacturer information. A translation is indicated by adding _trans to the field name, this gives us the field name mf_name_trans.

The translation language file can look like this:

"mf_name";"mf_name_trans"
"Apple";"Apple"
"Samsung";"Samsung"
"Nokia";"Nokia"

Importing Categories/Manufacturers/Shipping rates

The import process of categories and manufacturers is the same, only the categories is shown here. The order in which we are going to import is:

  1. Primary language
    Since this is the language where all other languages are based on, this goes first
  2. Translation languages
    We can only import translations if there is a primary language, so this comes after the primary language has been imported

To make the imports a success it is important that the first time the import is done the categories, manufacturers and/or shipping rates are empty. The categories are stored in the tables virtuemart_categories and virtuemart_categories_xx_xx where xx_xx is the languages you use. The manufacturers are stored in the tables virtuemart_manufacturers and virtuemart_manufacturers_xx_xx where xx_xx is the languages you use. The shipping rates are stored in the tables virtuemart_shipmentmethods and virtuemart_shipmentmethods_xx_xx where xx_xx is the languages you use. At the moment of writing, there is a bug in VirtueMart 2 that when you delete manufacturers, the manufacturer tables are not emptied. The advice is to use PhpMyAdmin to empty these tables manually.

Importing the primary language
Step 1

We want to do a category import so we create a template with Action as Import, component as VirtueMart and operation as Category. Save the template. When importing the manufacturers or shipping rates choose the appropriate import type.

Choose VirtueMart category import

Step 2

To import the primary language set the option Language and Translated Language to the same language. Our primary language is English, so here English is chosen for both.

Multi-language category primary settings

Step 3

With all the settings done we are going to load the file from our computer and import the primary categories, manufacturer or shipping rates file.

Sset import source

Step 4

Click on Process and let CSVI import the primary language categories, manufacturers or shipping rates.

Importing the translation language

After the import of the primary language is done, we can continue and import the translations.

Step 1

We want to do a category import so we create a template with Action as Import, component as VirtueMart and operation as Category. Save the template. When importing the manufacturers or shipping rates choose the appropriate import type.

Choose VirtueMart category import

Step 2

To import the translation language set the option Language to the primary language and Translated Language to the language included in the import file. Our primary language is English, so here English is chosen, the translation language we use is Dutch so Translated language is set to Dutch.

Multi-language category translation settings

Step 3

With all the settings done we are going to load the file from our computer and import the translation categories, manufacturer or shipping rates file.

Sset import source

Step 4

Click on Process and let CSVI import the translation language categories, manufacturer or shipping rates.

 

Importing Products

Product translations work different from the categories and manufacturers because products have a unique code, the product SKU. To import product translations we only need an import file per language.

Important! The category_path and the manufacturer_name must be in the same language as the product is.

An example file can look like this:

English

"product_sku";"product_name";"product_s_desc";"category_path";"manufacturer_name"
"G03";"Shovel";"Nice shovel.  You can dig your way to China with this one.";"Garden Tools";"Apple"


Dutch

"product_sku";"product_name";"product_s_desc";"category_path";"manufacturer_name"
"G03";"Schep";"Mooie schep.  Met deze schep graaf je een weg naar China.";"Tuingereedschap";"Apple"

Step 1

We want to do a product import so we choose the Action as Import, component as VirtueMart and operation as Product in the template settings and save the template.

Choose VirtueMart Product import

Step 2

To import the product language set the option Language to the language your product import file is made for. We are now importing the English language so we choose Language English. When importing the Dutch product file, we choose Dutch here.

Multi-language product language settings

Step 3

With all the settings done we are going to load the file from our computer and import the product file.

Sset import source

Step 4

Click on Process and let CSVI import the product translation.

Products are not showing up in the product list

After you have imported products and go to VirtueMart to check and see if they are there you might find that no products show up. The reason for this is that VirtueMart uses a different language than what you imported them in. For example, your site has 2 languages, English and Dutch where English is your site default language.

Joomla site language

(Extensions -> Language manager)

After you import your first products in the Dutch language, VirtueMart won't show them because it is looking for English products. To see the list of Dutch products you need to go to Extensions -> Language manager and set your Site language to Dutch as default. Now go back to VirtueMart and your products will show up.

Conclusion

We have now imported the categories, manufacturers and products in 2 languages, more languages can be added by importing more translations lists.

It is important to always respect the primary language. Any changes made to the primary language must be made to the translations as well. Especially important is when something is deleted from the primary language, it must be deleted from the translation language also as otherwise the link between the primary language and the translation is broken.

Read more ...

Delete out of stock products

| VirtueMart

The deletion of out of stock products is a three-step procedure.

  1. Export all products
  2. Clean up the list of products
  3. Import list of products to delete

Export all products

The first step is to export all products and their stock level.

  1. Create a new export template of the type Product export
  2. Add the fields
    product_sku
    product_in_stock
  3. Export the template
  4. Save the file on your computer

Clean up the list of products

Second step is to clean up the list of products by removing all products where the stock is more than 0

  1. Open the file in your favourite spreadsheet
  2. Sort the sheet on the product_in_stock field
  3. Delete all rows where the stock is greater than 0
  4. Add the column product_delete
  5. Set the column product_delete to Y for all rows
  6. Save the file

Import list of products to delete

Third step is to import the file to delete the products

  1. Create a new import template of the type Product import
  2. Set the template to use Column headers for configuration
  3. Import the file
  4. The products in the file will now have been removed

Read more ...