$oView->function() is not working

In fullproductinfo.tpl i have
[{assign var=“certificate” value=$oView->getVehicleCertificate($oDetailsProduct->oxarticles__oxid->value)}]
and everything is working fine i’m getting the data, but when i try to add the same line
[{assign var=“certificate” value=$oView->getVehicleCertificate($oDetailsProduct->oxarticles__oxid->value)}]
in listitem_infogrid.tpl i got an error : Function ‘getVehicleCertificate’ does not exist or is not accessible!
Anyone can tell me what wrong i’m doing?
Thank you.

have you extended both controllers with getVehicleCertificate function?

I have that function in a class where extending the oxwarticledetails and i have the same function where im extending from oxUBase.

Right behind this the log usually tells you in which class it’s looking for the method.

oxSystemComponentException-oxException (time: 2019-05-17 13:38:08): [0]: Function ‘getVehicleCertificate’ does not exist or is not accessible! (oxwArticleBox)

Stack Trace: #0 /home/beast/www/tmp/smarty/eb91670faf2d2f497738218fe285a9bd^%%CB^CB6^CB6C1C15%%listitem_infogrid.tpl.php(14): oxSuperCfg->__call(‘getVehicleCerti…’, Array)
#1 /home/beast/www/tmp/smarty/eb91670faf2d2f497738218fe285a9bd^%%CB^CB6^CB6C1C15%%listitem_infogrid.tpl.php(14): oxwArticleBox->getVehicleCertificate(NULL)

metadata:
‘oxwarticlebox’ => ‘project/project_module/application/components/widgets/project_oxwarticlebox’

class Myproject_Oxwarticlebox extends Myproject_Oxwarticlebox_Parent {

public function getVehicleCertificate($sOxid)
{
$oCore = oxNew(“myproject_core”);

     $oDb = oxDB::getDb();

     $rimId = $oDb->getOne("SELECT oxcode from oxarticles where oxid='".$sOxid."'");

     $vehicleId = oxRegistry::getConfig()->getRequestParameter('vehicleId');

     
     $certificate = $oCore->getVehicleCertificate($vehicleId, $rimId);

     return $certificate;
}

}

this is my class where i’m declaring the getVehicleCertificate function.

This does not match.

Oxubase can not be extended, you can only extend specific controllers.

I fixed the name in the metadata but i still have the same error.
I thought that when i make another class and extend the oxwArticleBox class like i did in the metadata, that i should have the function availabile, and render that on the listitem_infogrid.tpl. view

When the error says that the method is not found in oxwarticlebox although it is present in your class then oxwarticlebox is not extended by your class. You can check this in backend, modules, Installed Shop Modules.