A fix for "...undefined function mosHash"

The latest version of VirtueMart introduced two simple functions also used in Joomla! 1.0.10. In those functions a function called "mosHash" is used, which is not available in any Mambo versions, but was introduced in Joomla!. So if you're using Mambo and VirtueMart 1.0.6 you currently have a problem.

But there's a quick workaround for that. You just need to declare that function mosHash in the file /administrator/components/com_virtuemart/classes/ps_main.php and it's done.

So you can add the following code at the end of that file:

if( !function_exists( 'moshash' )) {
function mosHash( $seed ) {
return md5( $GLOBALS['mosConfig_secret'] . md5( $seed ) );
}
}

As as alternative you could use this patched version of the file ps_main.php and replace it with your existing version.