Version infrastructure

Virtuemart 1.5

For developers
You can easily update your tables in the updateMigration view in the backend (" Just use the "restore system defaults"

Virtuemart 1.1.x


The VirtueMart Version Updater is handled by a prepared Infrastructure of the following components:

  • class vmUpdate in the VirtueMart Installation
  • Versions Component on
  • Document Repository on

Basically the update process is the following:

Update Check + Patch Retrieval

The VirtueMart Installation asks for the latest available (stable) version of VirtueMart.{$VMVERSION->RELEASE}&task=latestversionastext

A number like "1.1.5" is returned - just the number as string, nothing else.

If the returned Version is higher than the installed Version, the user is allowed to download the Patch Package when available.

The VirtueMart Installation will ask for the location of the Patch Package:{$VMVERSION->RELEASE}&task=listpatchpackages

The Version Component on must have a new-line separated list of all available Patch Packages in the field "Extra Information:".


If the Patch Package exists, the URL is returned as pure Text. Example:

If no Patch Package exists for the requested Version Update, an empty String is returned.

In the last Step the Document is retrieved from the VirtueMart Document Repository and stored and extracted on the Server the VirtueMart Installation is located on.
Patch Package Manifest

After that the Package is checked for a file called "update.xml". this file must be located in the root of the Patch Package.

Here's an example update.xml:

 <?xml version="1.0"?>
    <releasedate>May 25th 2008</releasedate>
    <description>VirtueMart 1.1.3 Update Package for VirtueMart 1.1.0</description>
        <!-- Trailing Semicolons are not necessary -->
        <!-- Prefix placeholders must be used (#__ or  #__{vm}, not "jos_") -->
        <query>SELECT `id` FROM `jos_components`</query>


The Files in the Package are checked:

  • do all exist in the local extraction copy of the Patch Package Archive?
  • are all target files writable?
  • is the target directory writable if the target file doesn't exist?

The Patch Packages should always contain an updated version.php file, so the Version Update is visible afterwards.

Updated by Sören Eberhardt-Biermann almost 14 years ago · 3 revisions