Ja!, i think I found a bug in VM2 in file .../helpers/currencydisplay.php lines 44-53
In my case, $converterFile got this value from config "converter.php", so, line 44 allways fails, because gets this path ".../currency_converter/converter.php.php"
if (file_exists( JPATH_VM_ADMINISTRATOR.DS.'plugins'.DS.'currency_converter'.DS.$converterFile.'.php' )) {
$module_filename = $converterFile;
require_once(JPATH_VM_ADMINISTRATOR.DS.'plugins'.DS.'currency_converter'.DS.$converterFile.'.php');
if( class_exists( $module_filename )) {
$this->_currencyConverter = new $module_filename();
}
} else {
if(!class_exists('convertECB')) require(JPATH_VM_ADMINISTRATOR.DS.'plugins'.DS.'currency_converter'.DS.'convertECB.php');
$this->_currencyConverter = new convertECB();
}
Two options, trim the ".php", after getting "$converterFile = VmConfig::get('currency_converter_module');" on line 41, or fix something in config save functions to trim the ".php" part of the filename
Adding this line after lien 41 makes sense!
$converterFile=substr($converterFile, 0, strlen($converterFile)-4);
Be advised!
Thanks but the solution is just to remove the adding of the php, becaus the list is including
Hi, i don't think so, because line 47 will allways fail
if( class_exists( $module_filename )) {
It will never find a class named "converter.php"
The ".php" part of configuration MUST be trimmed at config save time, or at currency class load time!
hmm or that?
if (file_exists( JPATH_VM_ADMINISTRATOR.DS.'plugins'.DS.'currency_converter'.DS.$converterFile )) {
$module_filename = $converterFile;
$module_filename=substr($converterFile, 0, -4);
require_once(JPATH_VM_ADMINISTRATOR.DS.'plugins'.DS.'currency_converter'.DS.$converterFile);
if( class_exists( $module_filename )) {
$this->_currencyConverter = new $module_filename();
}
} else {
if(!class_exists('convertECB')) require(JPATH_VM_ADMINISTRATOR.DS.'plugins'.DS.'currency_converter'.DS.'convertECB.php');
$this->_currencyConverter = new convertECB();
}
Fair enough
$module_filename = $converterFile; //This line must die!
$module_filename=substr($converterFile, 0, -4);
Hi, may this fix get merged into VM main branch as a fixed bug?
Thanks in advise!
It is already since days in the svn. Read here http://dev.virtuemart.net/projects/virtuemart/wiki/Setting_up_a_Development_Environment