Frontend zusatz Reiter Daten aus Datenbank holen

Hallo

benötige ein wenig Starthilfe um durchzublicken.

Habe erfolgreich ein Modul registriert nach dem Vorbild von Vanilla

https://forum.oxid-esales.com/showthread.php?t=3927&page=3#post81559

  1. Modul ist aktiv
  2. Tab erscheint im Admin
    Wenn ich auf den Tab klicke, dann kommt die Shop Startseite.

Mein Ziel ist es Daten aus meiner neuen Tabelle oxartextends2 auszulesen mit den Artikelzusatzinformationen.

Hier die article_customtab.php im Verzeichnis: /application/controllers/admin/

<?php

class Article_Customtab extends oxAdminDetails
{
/* settings */
protected $sMyAdminCl = “article_customtab”; // name of you’r admin class
protected $sMyField = “oxlongdexc”; // fieldname in oxartextends
protected $sMyDbField = Null;

public function render()
{
$myConfig = $this->getConfig();
parent::render();

	$this-&gt;sMyDbField = "oxartextends2__".$this-&gt;sMyField; 

    $this-&gt;_aViewData['edit'] = $oArticle = oxNew( 'oxarticle' );

    $soxId = $this-&gt;getEditObjectId();
    $svoxId = oxConfig::getParameter( "voxid" );
    $soxparentId = oxConfig::getParameter( "oxparentid" );


    if (  $soxId && $soxId != "-1") {

        // load object
        $oArticle-&gt;loadInLang( $this-&gt;_iEditLang, $soxId );
        $iDataType = oxField::T_TEXT;

        $sValue = $oArticle-&gt;getOxArtExtended($this-&gt;sMyField);
        $oArticle-&gt;{$this-&gt;sMyDbField} = new oxField($sValue, $iDataType);


        // load object in other languages
        $oOtherLang = $oArticle-&gt;getAvailableInLangs();
        if (!isset($oOtherLang[$this-&gt;_iEditLang])) {
            // echo "language entry doesn't exist! using: ".key($oOtherLang);
            $oArticle-&gt;loadInLang( key($oOtherLang), $soxId );
        }

   		$aLang = array_diff (oxLang::getInstance()-&gt;getLanguageNames(), $oOtherLang);
        if ( count( $aLang))
            $this-&gt;_aViewData["posslang"] = $aLang;

        foreach ( $oOtherLang as $id =&gt; $language) {
            $oLang= new oxStdClass();
            $oLang-&gt;sLangDesc = $language;
            $oLang-&gt;selected = ($id == $this-&gt;_iEditLang);
            $this-&gt;_aViewData["otherlang"][$id] =  clone $oLang;
        }
    }
    
    $this-&gt;_aViewData["admincl"] = $this-&gt;sMyAdminCl;
    $this-&gt;_aViewData["field"] = $this-&gt;sMyDbField;
    $this-&gt;_aViewData["editor"] = $this-&gt;_generateTextEditor( "100%", 445, $oArticle, $this-&gt;sMyDbField, "details.tpl.css");
    $this-&gt;_aViewData["blUseTimeCheck"] = $myConfig-&gt;getConfigParam( 'blUseTimeCheck' );
        

    return "article_customtab.tpl";
} 

public function save()
{

 	$myConfig = $this-&gt;getConfig();
 	$soxId    = $this-&gt;getEditObjectId();
	$this-&gt;sMyDbField = "oxartextends2__".$this-&gt;sMyField; 
 	$sValues  = oxConfig::getParameter( "editval" );
 	$sParams = $sValues[$this-&gt;sMyDbField];
	if (isset($sParams)) {		
		$oDB = oxDb::getDb();
		$sFieldLang = ( $this-&gt;_iEditLang &gt; "0" ) ? $this-&gt;sMyField.'_'.$this-&gt;_iEditLang : $this-&gt;sMyField;
		$sParams = $oDB-&gt;quote($sParams);		
		$SQL = "UPDATE oxartextends2
				SET ".$sFieldLang." = ".$sParams."
				WHERE OXID = '".$soxId."'";		
		$oDB-&gt;execute($SQL);
	}
 }

public function delete()
{
$myConfig = $this->getConfig();
$soxId = $this->getEditObjectId();
$this->sMyDbField = “oxartextends2__”.$this->sMyField;

	$oDB = oxDb::getDb();
	$sFieldLang = ( $this-&gt;_iEditLang &gt; "0" ) ? $sthis-&gt;MyField.'_'.$this-&gt;_iEditLang : $this-&gt;sMyField;
	$SQL = "UPDATE oxartextends2
			SET ".$sFieldLang." = ''
			WHERE OXID = '".$soxId."'";
	$oDB-&gt;execute($SQL);
}

}

/application/views/admin/tpl/

exception log mal reingeschaut?

SHOPVERSION: 4.8.4

Hallo danke dass Du mir hilfst. hier ist der Log-Auszug.
Verstehe leider zu wenig um eine Lösung zu finden. So wie es aussieht wird in meinem Beispiel etwas aufgerufen was nicht gefunden wird. Das Beispiel ist von Vanilla.

Faulty component -->

oxSystemComponentException-oxException (time: 2014-04-11 13:25:09): [0]: Function ‘loadInLang’ does not exist or is not accessible! (oxarticle_extended)

Stack Trace: #0 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/application/controllers/admin/article_customtab.php(29): oxSuperCfg->__call(‘loadInLang’, Array)
#1 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/application/controllers/admin/article_customtab.php(29): oxarticle_extended->loadInLang(0, ‘5a7617d0bfb75c7…’)
#2 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/core/oxshopcontrol.php(465): Article_Customtab->render()
#3 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/core/oxshopcontrol.php(350): oxShopControl->_render(Object(oxarticle_extended))
#4 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/core/oxshopcontrol.php(123): oxShopControl->_process(‘article_customt…’, NULL, NULL, NULL)
#5 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/core/oxid.php(38): oxShopControl->start()
#6 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/index.php(27): Oxid::run()
#7 /home/httpd/vhosts/xcompany.ch/httpdocs/Shopme/admin/index.php(27): require_once(’/home/httpd/vho…’)
#8 {main}

<?php

METADATA File

Hier habe ich versucht die ‘Article_Customtab’ mitzuladen,hat aber nichts gebracht.
$sMetadataVersion = ‘1.0’;

$aModule = array(
‘id’ => ‘Meine Extendet Artikel’,
‘title’ => ‘Meine Extendet Artikel Modul Titel’,
‘description’ => ‘dein_modul.’,
‘version’ => ‘1.0’,
‘author’ => ‘WAS WEISS ICH’,
‘extend’ => array(‘oxarticle’ => ‘myoxarticle/oxarticle_extended’,
‘oxwarticledetails’ => ‘myoxarticle/oxarticle_extended’,
‘Article_Customtab’ => ‘myoxarticle/oxarticle_extended’
)
);

Also bin nicht wirklich weitergekommen.

Habe die Metadata.php im Modulverzeichnis erweitert und die Datei oxarticle_extended.php im Modulverzeichnis reinkopiert.

Der gleiche Fehler wie oben beschrieben!!!
Es sieht so aus, dass die oxarticle_extended.php nicht geladen wird…
Lösungsvorschläge??

<?php

$sMetadataVersion = ‘1.0’;

$aModule = array(
‘id’ => ‘Meine Extendet Artikel’,
‘title’ => ‘Meine Extendet Artikel Modul Titel’,
‘description’ => ‘dein_modul.’,
‘version’ => ‘1.0’,
‘author’ => ‘WAS WEISS ICH’,
‘extend’ => array(
‘oxarticle’ => ‘oxarticle/oxarticle_extended’
),
);

Habe versucht die oxarticle_extended.php zu “extenden” aber der Admin zeigt genau da den Fehler, dass diese Datei durchgestrichen wird.

Komme einfach nicht weiter.

MODULADMIN: die Extension ROT durchgestrichen
oxwarticledetails
oxarticle/oxarticle_extendedoxArticle
oxarticle/oxarticle_extended
oxarticle_extended
oxarticle/oxarticle_extended