am: 01. September 2010, 09:27:21
Hallo Gemeinde,
ich habe mir heute mit Hilfe des Moduls Product Tabs, das ich leider nicht mehr in der Modulecke finde, ein neues Textfeld für Crossselling gebaut. Dieses wird auch wunderbar in der product_info angezeigt, allerdings nicht in den Crossselling oder Also_purchased Links.
Vermutlich hab ich wohl vergessen eine Variable zu übergeben, aber ich weiß nicht was oder wo.
Also die Tabellenzelle liegt in der products_description als products_cross_description | text | latin1 | usw.
Die Bereitstellung im Adminmenü funktioniert auch und auch die Ausgabe auf der products_info Seite.
Für das CrossSelling sieht der Aufruf folgendermaßen aus:
\\includes\modules\cross_selling.php
$module_smarty = new Smarty
;$module_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE
.'/');$data = $product->getCrossSells();if (count($data)> 0) { $module_smarty->assign('language', $_SESSION['language']); $module_smarty->assign('module_content', $data); // set cache ID $module_smarty->caching = 0; $module = $module_smarty->fetch(CURRENT_TEMPLATE
.'/module/cross_selling.html'); $info_smarty->assign('MODULE_cross_selling', $module); $info_smarty->assign('PRODUCTS_CROSS_DESCRIPTION', stripslashes($product->data['products_cross_description']));}// reverse cross sellingif (ACTIVATE_REVERSE_CROSS_SELLING
=='true') {$module_smarty = new Smarty
;$data = $product->getReverseCrossSells(); if (count($data)> 0) { $module_smarty->assign('language', $_SESSION['language']); $module_smarty->assign('module_content', $data); // set cache ID $module_smarty->caching = 0; $module = $module_smarty->fetch(CURRENT_TEMPLATE
.'/module/reverse_cross_selling.html'); $info_smarty->assign('MODULE_reverse_cross_selling', $module); $info_smarty->assign('PRODUCTS_CROSS_DESCRIPTION', stripslashes($product->data['products_cross_description']));}}?> Der Aufruf im Template lautet folgendermaßen:
\\template\module\cross_selling.html
{config_load
file="$language/lang_$language.conf" section
="cross_selling"}<h3
>{#heading_text#}</h3>
<hr
class="hrlightgrey" />{foreach name
=aussen item
=module_data from
=$module_content} {foreach item
=products_data from
=$module_data.PRODUCTS
}<div
class="crossselling"> {if $products_data.PRODUCTS_IMAGE
!=''} <a href
="{$products_data.PRODUCTS_LINK}"><img src
="{$products_data.PRODUCTS_IMAGE}" alt
="{$products_data.PRODUCTS_NAME}" class="crosssellingImage" /></a
> {/if} <h2
><a href
="{$products_data.PRODUCTS_LINK}">{$products_data.PRODUCTS_CROSS_DESCRIPTION
}</a
></h2
> <span
class="price">{$products_data.PRODUCTS_PRICE
}</span
></div
> {/foreach}{/foreach} Dieser Aufruf ist bei allen drei Modulen (CrossSelling, ReverseCrossSelling und AlsoPurchased) der gleiche.
Kann mir jemand bei meinem Problem helfen?
THX webTre
Linkback: https://www.modified-shop.org/forum/index.php?topic=7748.0