Hallo!
Binde meine TopOfTheShops folgendermaßen in meine sidebar2.tpl ein:
[{block name="sidebar_boxproducts"}]
[{include file="widget/product/boxproducts.tpl" _boxId="topBox" _oBoxProducts=$oView->getTop5ArticleList() _sHeaderIdent="BOX_TOPOFTHESHOP_HEADER"}]
[{/block}]
die boxproducts.tpl:
[{oxscript add="$('a.js-external').attr('target', '_blank');"}]
[{oxscript include="js/widgets/oxarticlebox.js" priority=10 }]
[{oxscript add="$( 'ul.js-articleBox' ).oxArticleBox();" }]
<div class="box" [{if $_boxId}]id="[{$_boxId}]"[{/if}]>
[{if $_sHeaderIdent}]
<h3 class="clear">
BESTSELLER - TOP 3
</h3>
[{/if}]
<ul class="js-articleBox featuredList">
[{foreach from=$_oBoxProducts item=_oBoxProduct name=_sProdList}]
[{ assign var="_sTitle" value="`$_oBoxProduct->oxarticles__oxtitle->value` `$_oBoxProduct->oxarticles__oxvarselect->value`"|strip_tags}]
[{block name="widget_product_boxproduct_image"}]
<li class="articleImage" [{if !$smarty.foreach._sProdList.first}] style="display:none;" [{/if}]>
<a class="articleBoxImage" href="[{ $_oBoxProduct->getMainLink() }]">
<img src="[{$_oBoxProduct->getIconUrl()}]" alt="[{$_sTitle}]">
</a>
</li>
[{/block}]
[{block name="widget_product_boxproduct_price"}]
[{ assign var="currency" value=$oView->getActCurrency()}]
<li class="articleTitle">
<a href="[{ $_oBoxProduct->getMainLink() }]">
[{ $_sTitle }]<br>
[{oxhasrights ident="SHOWARTICLEPRICE"}]
[{if $_oBoxProduct->getFPrice()}]
<strong>[{ $_oBoxProduct->getFPrice() }] [{ $currency->sign}]</strong>
[{/if}]
[{/oxhasrights}]
</a>
</li>
[{/block}]
[{/foreach}]
</ul>
</div>
funktioniert alles super. Nur wenn ich auf ein Produkt klicke oder in meinem Benutzerkonto herumklicke, wird eine leere Box angezeigt. (also nur die Überschrift)
Bitte um Hilfe,
Danke