Hallo,
wie der Titel schon sagt, würde ich gern in den related Products (accessoires, crossselling, lastproducts, similar) die bewertung für das jeweilige Produkt anzeigen lassen. Man soll auch darüber nicht bewerten könne, das soll weiterhin auf der Detailseite geschehen, ich möchte lediglich das aktuelle Rating ausgeben. Ist das irgendwie möglich? Ich habe mich bereits daran versucht, aber bekomme immer das Rating vom Artikel der Detailseite und nicht das vom Produkt unter related Products.
Gruß Richard
Guten Morgen Richard,
ohne deinen Quellcode oder zumindest einem Ausschnitt kann man auf deine Problemstellung nicht so gut eingehen.
Viele Grüße aus Berlin
indianer3c
Hallo Indianer,
ich habe in der related_products.tpl folgendes hinzugefügt:
[{block name="details_relatedproducts_lastseen"}]
[{ if $oView->getLastProducts()|count}]
[{capture append="oxidBlock_productbar"}]
[{include file="widget/product/boxproducts.tpl" _boxId="lastproducts" _oBoxProducts=$oView->getLastProducts() _sHeaderIdent="Zuletzt gesehen" _sHeaderCssClass="lightHead"}]
[{/capture}]
[{/if }]
[{/block}]
crossselling, similarproducts, accessoires habe ich auskommentiert.
in der boxproducts.tpl steht folgendes:
<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_rating"}]
<li class="ap_rating">
</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> [{if $_oBoxProduct->isRangePrice()}]
[{ oxmultilang ident="PRICE_FROM" }]
[{if !$_oBoxProduct->isParentNotBuyable() }]
[{ $_oBoxProduct->getFMinPrice() }]
[{else}]
[{ $_oBoxProduct->getFVarMinPrice() }]
[{/if}]
[{else}]
[{if !$_oBoxProduct->isParentNotBuyable() }]
[{ $_oBoxProduct->getFPrice() }]
[{else}]
[{ $_oBoxProduct->getFVarMinPrice() }]
[{/if}]
[{/if}]
[{ $currency->sign}]</strong>
[{/if}]
[{/oxhasrights}]
</a>
</li>
[{/block}]
[{/foreach}]
</ul>
da, wo ich li class=“ap_rating” angelegt habe, würde ich gern das rating für das jeweilige produkt ausgeben lassen, man soll dort nicht bewerten können, lediglich die sterne sollen erscheinen.