Hi all,
I need to overide VirtueMartCustomFieldRenderer in a system plugin but currently the new code don't check for exising class in
JOOMLAROOT\administrator\components\com_virtuemart\models\customfields.php line 780 and 805.
if(self::$customfieldRenderer){
self::$customfieldRenderer = false;
if (!class_exists ('VmView'))
require(VMPATH_SITE . DS . 'helpers' . DS . 'vmview.php');
$lPath = VmView::getVmSubLayoutPath ('customfield');
if($lPath){
require ($lPath);
} else {
vmdebug('displayProductCustomfieldFE layout not found customfield');
}
}
adding a class_exists with this code:
if(self::$customfieldRenderer){
self::$customfieldRenderer = false;
if(!class_exists('VirtueMartCustomFieldRenderer') {
if (!class_exists ('VmView'))
require(VMPATH_SITE . DS . 'helpers' . DS . 'vmview.php');
$lPath = VmView::getVmSubLayoutPath ('customfield');
if($lPath){
require ($lPath);
} else {
vmdebug('displayProductCustomfieldFE layout not found customfield');
}
}
}
Solve the problem with a minimum code change.
Thanks to fix this.
Patrick