Habe mir das mal angesehen, da ich das auch ziemlich lästig finde:
Ist im Grunde ziemlich simpel zu lösen:
in “[B]core/oxcategory.php[/B]”, “[B]function getAttributes()[/B]”
werden die Attribute mit dem SQL-Befehl
$sSelect = "SELECT DISTINCT att.oxid, att.oxtitle{$sLngSuf}, o2a.oxvalue{$sLngSuf} ".
"FROM $sAttTbl as att, $sO2ATbl as o2a ,$sC2ATbl as c2a ".
"WHERE att.oxid = o2a.oxattrid AND c2a.oxobjectid = $sActCatQuoted AND c2a.oxattrid = att.oxid AND o2a.oxvalue{$sLngSuf} !='' AND o2a.oxobjectid IN ($sArtIds) ".
"ORDER BY c2a.oxsort , att.oxpos, att.oxtitle{$sLngSuf}, o2a.oxvalue{$sLngSuf}";
ausgewählt.
Wenn man den ersetzt mit
$sSelect = "SELECT DISTINCT att.oxid, att.oxtitle{$sLngSuf}, o2a.oxvalue{$sLngSuf} ".
"FROM $sAttTbl as att, $sO2ATbl as o2a ,$sC2ATbl as c2a ".
"WHERE att.oxid = o2a.oxattrid AND c2a.oxobjectid = $sActCatQuoted AND c2a.oxattrid = att.oxid AND o2a.oxvalue{$sLngSuf} !='' ".
"ORDER BY c2a.oxsort , att.oxpos, att.oxtitle{$sLngSuf}, o2a.oxvalue{$sLngSuf}";
dann werden auch [B]nach [/B]einer Auswahl [B]alle [/B]Attributoptionen in den Selectboxen angezeigt, so dass man bequem direkt andere Attribute auswählen kann…
Da “[B]$sArtIds[/B]” jetzt nicht mehr gebraucht wird, kann man gleich noch den folgenden Code löschen/auskommentieren.
$sArtIds = '';
foreach (array_keys($oArtList->getArray()) as $sId ) {
if ($sArtIds) {
$sArtIds .= ',';
}
$sArtIds .= $oDb->quote($sId);
}
Besser wäre es natürlich, “[B]function getAttributes()[/B]” in ein Modul auszulagern, und das dort zu ändern…