Installation/Updating

Written by Max Milbers. Posted in Concepts

Installation

There are two different package types:

  1. Installers for Joomla
  2. Joomla with preinstalled VirtueMart core and extensions

1. installers for joomla

The installers for Joomla are provided in a com_virtuemart.x.y.z_extract_first.zip. The z stands for the subversion, packages with even numbers are released for production. Packages ending with an uneven number are prereleases for testing. After extraction you will find three files

  • com_virtuemart.x.y.z.zip
  • com_virtuemart_ext_aio.x.y.z.zip
  • com_tcpdf_x.y.z.zip

They are meant to be installed in the above order using the Extension Manager in the Joomla back-end. If there are installation problems, it is also valid to extract the packages into a folder on your computer and upload them using an FTP client. In this case it is mandatory to use the "Discover" feature of Joomla and it is recommended to execute the "Install tables or if necessary update them" command accessible in the VirtueMart tools section. This tool is quite important. It executes the install/update scripts of VirtueMart manually. The VirtueMart Aio menu item displays a list with all extensions for VirtueMart and also has a button to update or install the tables of the plugins.

You may follow this tutorial Installation of VirtueMart 

2. joomla with preinstalled VirtueMart and extensions

The installation is the same as for Joomla. It just needs to be uploaded/extracted into the web directory. The installation is done with a slightly modified Joomla setup. The normal Joomla sample data is replaced with the basic setup for a store. The full installer provides many advantages and saves a lot of configuration time. It directly creates a working store and provides a menu for the VirtueMart views. It also demonstrates how a basic setup should look like. It is possible to do the first test checkout within 2 minutes after installation.

Updating

The normal installation packages are also directly useable for updates. The normal way here is also to use the Joomla Extension Manager for installing an update. Always directly update to the last version of VirtueMart. So a vm2.0.2 can be directly updated to vm2.6.28. For updating to a new main version it is the same rule. A VM2 should be always directly updated with the most recent VM3. It is very likely that are more recent version has also more backward compatibilities fixes and enhanced updating procedure.

VirtueMart has it's own table updater, which checks for differences in the installation.sql and the existing tables. Deletion of columns is disabled to prevent data losses in case the tables got modified (have additional tables). So it is quite normal that the update process displays messages of the type 'Notice', like "Taking config from file" or some variants of 'Table updated: Tablename '.$tablename.' dropped: '.$dropped.' altered: '.$altered.' added: '.$added.

It is only important to pay attention to messages which are Errors or Warnings.

Languages

Before the installation of VirtueMart it is recommended to install the preferred main language first. The preferred language should be configured as 'site' language in Joomla.

When installing VirtueMart, the installer creates the language database tables for the selected site language, into which for example the product information is stored. Only English language files are delivered with the VirtueMart installation packages. All other language packs can be downloaded from http://virtuemart.net/community/translations and installed using the Joomla Extension Manager. Afterwards the language(s) is (are) available for selection in the VirtueMart configuration.

When updating old versions of VirtueMart or when it was accidently installed with the wrong language, it is possible to change the used language and let VirtueMart create the new tables or update the old ones by storing the VirtueMart configuration.

A guide for setting up a multilanguage shop is available here:
http://docs.virtuemart.net/tutorials/multilingual-store/99-multilanguage-setup.html

Troubleshooting

alterColumns alterKey not finished, please raise execution time and update tables again.

In this case it may be sufficient to use the "Install tables or if necessary update them" command accessible in the tools section.

"There was an error uploading this file to the server" or  "unknown archive type

Then just upload the installer per ftp to the temp directory and choose the 2nd option, for more information, look here http://www.phoca.cz/phocagallery/478-how-to-install-large-components-with-help-of-ftp-in-joomla

ERROR: Could not find an XML setup file in the package". What's wrong?

Mostly this problem arises because you have not unpacked the file com_virtuemart.x.y.z_extract_first.zip before and tried to upload/install this file.

Backend menu entry is missing

This can happen, when you did uninstall VirtueMart core or the Aio. Check your extension table of joomla and set the value of the column state from -1 to 0.

Another component is already using the directory com_virtuemart

Please delete the directories /site_root/components/com_virtuemart and /site_root/administrator/components/com_virtuemart. If you can't delete the directories using ftp, try the eXtplorer file manager extension for Joomla! instead.

All products dissapeared after changing the language

Dont panic. This happened most likely due a change of the language setting.

There are two different translation sets in Virtuemart. There is the translation for normal text and messages for example login, cart, "product not found" and so on. This translation is usually done by the joomla/virtuemart community. You can use the language overrides to adjust them to your taste. This translation is selected in the joomla language manager. You can easily display your shop in 20 languages. It takes maybe 10 minutes to install it.

But there is also another language setting, which sets the languages for your own entered texts like the product desciption. The virtuemart language system is very fast, but had in vm2 the disadvantage that products must provide a "translation" even it is just a copy of the main language. Otherwise the sql was not able to find the product. In VirtueMart 3 the system works with fallback to the main language.
The products dissapeared, because you installed the store with english configured as main language in joomla. Then all tables are created with english language tag. If you change now in the joomla language manager the main language, then virtuemart tries to load non-existing language tables. Virtuemart uses as fallback the default site language of joomla or the first listed virtuemart language. You can make a store which uses a lot languages and show the product descriptions always in english, for example. 

How to solve it

Storing the configuration creates/updates the language tables if necessary. The selection of the languages works whitelisted. So when the selected language is not found, vm uses the fallback. If this does not work, you can select the fallback language.

For example the store got installed in english, then the joomla default site language got changed for example to spanish. Opening the virtuemart configuration shows no entries in the language configuration field. It worked before, because if nothing is configured, it is using the joomla default site language, which got changed meanwhile, so spanish is set as vm language. In a single language store it is just need to set "english" language in the configuration. VM selects then always the only available englisch.

If this should be fixed, in special if already content got entered, the best is to rename the tables with phpmyadmin or similar. You need just to rename all tables with a language tag to your new tag. The language tags are lower case using underscore. so en-GB becomes en_gb. So in case for spain, search for all tables with en_gb at the end and rename them to the spain tag es_es.