Jump to content
xt:Commerce Community Forum

[SOLVED] Hersteller bei Artikel detail ansicht anzeigen


Dress

Recommended Posts

naja,

eine andere Möglichkeit wäre natürlich, jedesmal den Hersteller komplett abzufragen, dann hat man alles, kostet bei vielen Produkten im Listing natürlich etwas Zeit ....

Ansonsten dann halt so ( das Bild gleich noch mit, bevor Du auch noch danach fragts :-)

global $db, $language, $store_handler;

$rs = $db->Execute("SELECT m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, s.url_text FROM ".TABLE_MANUFACTURERS." AS m
                    LEFT JOIN ".TABLE_SEO_URL." ON ( m.manufacturers_id = s.link_id )
                    WHERE m.manufacturers_id = '".$this->data['manufacturers_id']."'
                    AND s.link_type = '4' AND s.language_code = '".$language->code."' AND s.store_id = '".$store_handler->shop_id."'");
if ( _SYSTEM_MOD_REWRITE == 'true' || _SYSTEM_MOD_REWRITE_DEFAULT == 'true') {
    if (_SYSTEM_SEO_FILE_TYPE > '') {
        $manufacturers_link = $rs->fields['url_text']."."._SYSTEM_SEO_FILE_TYPE;
    } else {
        $manufacturers_link = $rs->fields['url_text'];
    }
} else {
    $manufacturers_link = "index.php?page=manufacturer&mnf=".$rs->fields['manufacturers_id'];
}
                    
$this->data['manufacturers_name'] = $rs->fields['manufacturers_name'];
$this->data['manufacturers_image'] = $rs->fields['manufacturers_image'];
$this->data['manufacturers_link'] = $rs->fields['manufacturers_link'];

 

 

Link to comment
Share on other sites

  • 1 month later...
  • Replies 102
  • Created
  • Last Reply

Sorry, kleiner Fehler bei der SQL-Abfrage:

$rs = $db->Execute("SELECT m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, s.url_text FROM ".TABLE_MANUFACTURERS." AS m
                    LEFT JOIN ".TABLE_SEO_URL." AS s ON ( m.manufacturers_id = s.link_id )
                    WHERE m.manufacturers_id = '".$this->data['manufacturers_id']."'
                    AND s.link_type = '4' AND s.language_code = '".$language->code."' AND s.store_id = '".$store_handler->shop_id."'");

und die letzte Zeile muss natürlich lauten:

$this->data['manufacturers_link'] = $manufacturers_link;

( due Ursache der Fehlerseite findet man u.U. leicht mit "" in der /conf/config.php )

Grüsse

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
  • Create New...