class oxGetArticleByNumberPlugin extends oxErpPluginBase
{
public function invoke($aParams)
{
$am = $this->getConfig()->getParameter(‘am’);
$art = $this->getConfig()->getParameter(‘oxartnum’);
$aResult = array();
$rs = oxDb::getDB()->select( "SELECT OXID FROM ...");
if ($rs != false && $rs->count() > 0)
{
while (!$rs->EOF) {
$rs->fields = array_change_key_case($rs->fields, CASE_LOWER);
$aResult[] = $rs->fields['oxid']; //only the oxid
$rs->fetchRow();
}
$oResult = new oxERPReturn();
$oResult->aResult = $aResult;
$oResult->blResult = true;
return $oResult;
}
}
Call to undefined method oxGetArticleByNumberPlugin::getConfig().
but when I try:
$am = $aParams[‘am’];
$art = $aParams[‘oxartnum’];
there is no error but $art param is empty.