I get the massage "Vm Invoice Manager doesn't work without Virtuemart." but virtuemart is installed.
So I think somthing is wrong with this function
# DETECT IF VM IS INSTALLED
if(isVmInstalled()) { define('_VMINSTALLED', '1'); }
else
{
global $mainframe;
$mainframe->enqueueMessage(_VMINV_WARN_VMNOTINSTALLED, 'error');
$mainframe->redirect('index.php');
}
// an all the others
function isVmInstalled()
{
$isVm = 1;
$db =& JFactory::getDBO();
$count = "SELECT count(*) FROM #__components WHERE name = 'VirtueMart' ";
$db->setQuery( $count);
$total = $db->loadResult();
if(!$total>0) { $isVm = 0; }
if(file_exists(_VM_ADMIN_PATH.'virtuemart.cfg.php'))
{
require_once(_VM_ADMIN_PATH.'virtuemart.cfg.php');
}
else { $isVm = 0; }
if(file_exists(_VM_ADMIN_PATH .'classes'.DS.'currency'.DS.'class_currency_display.php'))
{
require_once(_VM_ADMIN_PATH .'classes'.DS.'currency'.DS.'class_currency_display.php');
}
else { $isVm = 0; }
RETURN $isVm;
}
Any Suggestions?
Hi,
try to add comment code '/*' and '*/' like this:
function isVmInstalled()
{
$isVm = 1;
/*
$db =& JFactory::getDBO();
$count = "SELECT count(*) FROM #__components WHERE name = 'VirtueMart' ";
$db->setQuery( $count);
$total = $db->loadResult();
if(!$total>0) { $isVm = 0; }
*/
if(file_exists(_VM_ADMIN_PATH.'virtuemart.cfg.php'))
{
require_once(_VM_ADMIN_PATH.'virtuemart.cfg.php');
}
else { $isVm = 0; }
if(file_exists(_VM_ADMIN_PATH .'classes'.DS.'currency'.DS.'class_currency_display.php'))
{
require_once(_VM_ADMIN_PATH .'classes'.DS.'currency'.DS.'class_currency_display.php');
}
else { $isVm = 0; }
RETURN $isVm;
}
Than let me know.
claudio