Herstellername, -Bild und -Link sowie Kurzbeschreibung auf Produktseite – Wiki | modified eCommerce Shopsoftware

Herstellername, -Bild und -Link sowie Kurzbeschreibung auf Produktseite

Aus Wiki | modified eCommerce Shopsoftware

Wie kann ich auf der Artikelseite Hersteller-Logo und Herstellername einfügen?


Lösung von Tomcraft [01.2011]
(Forum Ref.: ANLEITUNG: Herstellername, -Bild & -Link sowie Kurzbeschreibung auf Produktseite)


Erweitere deine "/includes/modules/product_info.php"

Finde:

xtc_db_query("update ".TABLE_PRODUCTS_DESCRIPTION." set products_viewed = products_viewed+1 where products_id = '".$product->data['products_id']."' and language_id = '".$_SESSION['languages_id']."'");

Füge an:

// BOF - Tomcraft - 2011-02-24 - Get manufacturer name etc. for the product page
    $manufacturer_query = xtc_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$_SESSION['languages_id'] . "'), " . TABLE_PRODUCTS . " p where p.products_id = '" . $product->data['products_id'] . "' and p.manufacturers_id = m.manufacturers_id");
    if (xtc_db_num_rows($manufacturer_query)) {
        $manufacturer = xtc_db_fetch_array($manufacturer_query);
        $manufacturers_image='';
        if (xtc_not_null($manufacturer['manufacturers_image'])) $manufacturers_image=DIR_WS_IMAGES . $manufacturer['manufacturers_image'];
        $info_smarty->assign('MANUFACTURER_IMAGE',$manufacturers_image) ;
        $info_smarty->assign('MANUFACTURER',$manufacturer['manufacturers_name']);
        $info_smarty->assign('MANUFACTURER_LINK',xtc_href_link(FILENAME_DEFAULT, xtc_manufacturer_link($manufacturer['manufacturers_id'],$manufacturer['manufacturers_name'])));
    }
// EOF - Tomcraft - 2011-02-24 - Get manufacturer name etc. for the product page

Finde:

$info_smarty->assign('PRODUCTS_DESCRIPTION', stripslashes($product->data['products_description']));

Füge an:

	
// BOF - Tomcraft - 2011-02-24 - PRODUCTS_SHORT_DESCRIPTION for the product page
$info_smarty->assign('PRODUCTS_SHORT_DESCRIPTION', stripslashes($product->data['products_short_description']));
// EOF - Tomcraft - 2011-02-24 - PRODUCTS_SHORT_DESCRIPTION for the product page


Datei "/lang/german/lang_german.conf"
Finde Sektion: [product_info]

Darin einfügen:

#BOF - Tomcraft - 2011-02-24 - Get manufacturer name etc. for the product page
manufacturer_more_of = 'Mehr Artikel von:'
#EOF - Tomcraft - 2011-02-24 - Get manufacturer name etc. for the product page


Datei "/lang/english/lang_english.conf"
Sektion [product_info]
Einfügen:

#BOF - Tomcraft - 2011-02-24 - Get manufacturer name etc. for the product page
manufacturer_more_of = 'More products of:'
#EOF - Tomcraft - 2011-02-24 - Get manufacturer name etc. for the product page


Jetzt stehen dir in der "/templates/xtc5/module/product_info/product_info_xxx.html" folgende zusätzliche Smartie-Tags zur freien Verwendung:

{$MANUFACTURER}
{$MANUFACTURER_LINK}
{$MANUFACTURER_IMAGE}
{$PRODUCTS_SHORT_DESCRIPTION}

Die product_info_v1.html kann nun mit folgendem Code erweitert werden:

{if $MANUFACTURER!=''}
  <div class="hrlightgrey"></div>
  {#manufacturer_more_of#} <a title="{$MANUFACTURER}" href="{$MANUFACTURER_LINK}">{$MANUFACTURER}</a>
{/if}
{if $MANUFACTURER_IMAGE!=''}
  <a title="{$MANUFACTURER}" href="{$MANUFACTURER_LINK}">{$MANUFACTURER_IMAGE}</a>
{/if}
  • Diese Seite wurde zuletzt am 13. November 2014 um 01:02 Uhr bearbeitet.