Hallo,
Danke fürs Feedback. ist ein bißchen anders. Siehe Screenshot

da steht jeweils nur der Titel, neben den Categorie-Bildern, nicht die Long-Description.
Problem ist ja, die Funktion getSubCatList() im Template
[{foreach from=$oView->getSubCatList() item=category name=MoreSubCat}]
gibt ein Liste von Kategorieobjekten zurück, die zwar Title aber keine Long-Description haben…
Dem möchte ich gern auf den Grund gehen.
Dem Template steht vermutlich die View Klasse “views\alist.php” gegenüber
Zeile 850 ff.
class aList extends oxUBase
-> class oxUBase extends oxView
-> class oxView extends oxSuperCfg
/**
* Template variable getter. Returns list of subategories.
*
* @return array
*/
public function getSubCatList()
{
if ( $this->_aSubCatList === null ) {
$this->_aSubCatList = array();
if ( $oClickCat = $this->getActCategory() ) {
$this->_aSubCatList = $oClickCat->getSubCats();
}
}
return $this->_aSubCatList;
}
$oClickCat kommt vermutlich aus der Core Funktion “core\oxcategory.php”
Zeile 271 ff.
class oxCategory extends oxI18n implements oxIUrl // Mehrsprachig (oxI18n)
class oxI18n extends oxBase // Hier gibts den Datenbankzugriff
class oxBase extends oxSuperCfg
/**
* returns the sub category array
*
* @return array
*/
public function getSubCats()
{
return $this->_aSubCats;
}
_aSubCats wird von setSubCat() in
In
Zeile 462 ff.
class oxCategoryList extends oxList
class oxList extends oxSuperCfg implements ArrayAccess, Iterator, Countable
/**
* Category list postprocessing routine, responsible building an sorting of hierarchical category tree
*
* @return null
*/
protected function _ppBuildTree()
{
$aTree = array();
foreach ($this->_aArray as $oCat) {
$sParentId = $oCat->oxcategories__oxparentid->value;
if ( $sParentId != 'oxrootid') {
if (isset($this->_aArray[$sParentId])) {
$this->_aArray[$sParentId]->setSubCat($oCat, $oCat->getId(), true);
}
} else {
$aTree[$oCat->getId()] = $oCat;
}
}
$this->assign($aTree);
}
$this->_aArray wird gesetzt in
Zeile 270 ff.
/**
* set full category object in tree
*
* @param string $sId category id
*
* @return null
*/
protected function _ppLoadFullCategory( $sId )
{
if ( isset($this->_aArray[$sId])) {
$oNewCat = oxNew('oxcategory');
if ( $oNewCat->load($sId)) {
// replace aArray object with fully loaded category
$this->_aArray[$sId] = $oNewCat;
}
} else {
$this->_sActCat = null;
}
}
Also werden Infos geholt mit $oNewCat->load($sId)
Kommt aus oxBase
Zeile 565 ff.
/**
* Loads object data from DB (object data ID is passed to method). Returns
* true on success.
* could throw oxObjectException F ?
*
* @param string $sOXID Object ID
*
* @return bool
*/
public function load( $sOXID)
{
/*
if( !isset($oxID)){
$oEx = oxNew('oxObjectException','core');
$oEx->setMessage('EXCEPTION_OBJECT_OXIDNOTSET');
$oEx->setObject($this);
throw $oEx;
}*/
//getting at least one field before lazy loading the object
$this->_addField('oxid', 0);
$sSelect = $this->buildSelectString( array( $this->getViewName().".oxid" => $sOXID));
return $this->_isLoaded = $this->assignRecord( $sSelect );
}
mit buildSelectString()
Zeile 601 ff.
/**
* Builds and returns SQL query string.
*
* @param mixed $aWhere SQL select WHERE conditions array (default false)
*
* @return string
*/
public function buildSelectString( $aWhere = null)
{
$oDB = oxDb::getDb(true);
$myUtils = oxUtils::getInstance();
$sGet = $this->getSelectFields();
$sSelect = "select $sGet from " . $this->getViewName() . " where 1 ";
if ( $aWhere) {
reset($aWhere);
while (list($name, $value) = each($aWhere)) {
$sSelect .= " and " . $name.' = '.$oDB->quote($value);
}
}
// add active shop
return $sSelect;
}
mit getSelectFields()
Zeile 668
/**
* Function builds the field list used in select.
*
* @return string
*/
public function getSelectFields()
{
$aSelectFields = array();
$sViewName = $this->getViewName();
foreach ( $this->_aFieldNames as $sKey => $sField ) {
$aSelectFields[] = $sViewName . '.' . $sKey;
}
$sSelectFields = join( ", ", $aSelectFields );
return $sSelectFields;
}
$this->_aFieldNames wird gesetzt über _addField()
usw… landet man dann irgendwann in DB->
MetaColumns(), darüber werden die Felder initalisiert.
Die müßten eigentlich komplett für jede Tabelle sein…
Beantwortet leider nicht die Frage, wieso
[{ $category->oxcategories__oxlongdesc->value }]
nicht funktioniert, müßte eigentlich, oder?
Mit Bitte um Hilfe. Ich verzweifel noch… 
Danke