Jump to content
xt:Commerce Community Forum
Sign in to follow this  
konair

Kategoriename auf Produktseite

Recommended Posts

Hallo,

habe versucht, das Plugin mz_box_hersteller von mzanier so umzubauen, dass der jeweilige Kategoriename auf der Produktseite angezeigt wird.

Leider bisher ohne Erfolg. Wie kann ich denn das Plugin dahingehend umbauen?

Hier der Code der PHP-Datei:

// schützt die Datei vor direktem Aufruf im Browser
defined('_VALID_CALL') or die('Direct Access is not allowed.');

// überprüft ob das Plugin aktiviert ist
if (!isset($xtPlugin->active_modules['mz_box_hersteller'])){

// Box nicht anzeigen
$show_box = false;

} else{


// parameter aus Template tag holen
$man_id = (int)$params['manufacturer'];

if ($man_id>0) {
global $db,$language,$xtLink;
$rs = $db->Execute("SELECT m.*,s.* FROM ".TABLE_MANUFACTURERS." m, ".TABLE_SEO_URL." s WHERE m.manufacturers_id='".$man_id."' and m.manufacturers_id=s.link_id and s.link_type='4' and language_code='".$language->code."'");
if ($rs->RecordCount()==1) {

$link_array = array('page'=> 'manufacturers', 'type'=>'manufacturer', 'name'=>$rs->fields['manufacturers_name'], 'id'=>$rs->fields['manufacturers_id'],'seo_url' => $rs->fields['url_text']);
$rs->fields['link'] = $xtLink->_link($link_array);
$tpl_data = array('_man_data'=> $rs->fields);

$show_box = true;
} else {
$show_box = false;
}

} else {
$show_box = false;
}


}
?>[/PHP]

und von der Box:

[HTML]{if $_man_data.manufacturers_image neq ''}
<p><a href="{$_man_data.link}" title="{$_man_data.manufacturers_name|escape:"html"}">{img img=$_man_data.manufacturers_image type=m_manufacturer_thumb class=productImageBorder alt=$_man_data.manufacturers_name|escape:"html"}</a></p>
{/if}
<p><a href="{$_man_data.link}" title="{$_man_data.manufacturers_name|escape:"html"}">Alle Artikel von {$_man_data.manufacturers_name|escape:"html"}</a></p>[/HTML]

ODer gibt es eine andere Möglichkeit?

Danke!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...