Process  •   February 23rd, 2010

7 Steps To Upgrading Your Virtuemart Store

Virtuemart is my favorite platform for creating a powerful, open-source (aka free!), ecommerce stores. Part of its beauty is that operates on the Joomla content management system. So it’s easy to do more than just a store. But the Joomla community officially switched from Joomla 1.0 to Joomla 1.5 over a year ago. Which means that new extensions/modules, latest support, tips, are mostly being generated only for 1.5. While Virtuemart on Joomla 1.0 is still powerful, eventually we’ll all want to upgrade to the new version. So, lets upgrade this thing.

Here’s the upgrade to-do list:

  • 1. Back up your files and make sure you have your mysql database login info. (You’ll need this later.) If you’re upgrading a live store I recommend doing the upgrade in a sub-folder rather than the main location. That way you have some leeway to deal with issues without affecting the main site.
  • 2. Install fresh versions of Joomla and Virtuemart using new databases to keep your old installations safe.
  • 3. Install MTW-Migrator. This extension will connect to the old database (this is where you’ll need your mysql database login credentials) and place all the data from your old database into your new database. It’s a must-have because Joomla 1.0 data has to be “migrated” to 1.5 due to differences in database structure.
  • 4. Install any new extensions required. Not all extensions available are 1.5-compatible. But Joomla 1.5 can operated in “legacy mode” if Joomla 1.0 compatibility is necessary.
  • 5. Copy over your themes from the Joomla 1.0 store into their new homes.
  • 6. Modify your themes to fit the Joomla 1.5 way of doing things.
  • 7. Test, test test.

IMPORTANT: Your first attempt to load your newly upgraded site will most likely result in a “Direct access…” error message. This is caused by a change in the PHP tag Joomla uses at the top of the page to identify valid pages. In your index.php file, or any of your theme files causing this issues, look at the top of the file for:
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); and change it to defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );

On moving over Virtuemart files. If your Virtuemart files are of a more recent version, you can copy over your entire /compnents/com_virtuemart and /administrator/components/com_virtuemart folders over to their new homes. Newer versions are compatible with both Joomla 1.0 and Joomla 1.5. For example, I’ve been able to do this with Virtuemart versions 1.1.2 or greater.

On Joomla 1.5 theming. Joomla 1.5 uses a different method for managing module positions in it’s theme structure. For example, defining a module position in your Joomla 1.0 theme would look something like this:
mosLoadModules ( 'left', -2 ); But in Joomla 1.5, module positions are defined this way:
jdoc:include type="modules" name="left" style="xhtml"

This isn’t meant to be the definitive Joomla upgrade guide for your Virtuemart store. But I hope it gives you a heads-up about what the upgrade entails.

Leave a Reply