0
我們正在使用以下幾個代碼評論顯示評論&評分。我想顯示星上面的 「標題」:This is really very good product
顯示評分以前評論
<?php $_items = $this->getReviewsCollection()->getItems();?>
<div class="box-collateral box-reviews" id="customer-reviews">
<?php if (count($_items)):?>
<div class="review-heading">
<h2>
<?php echo $this->__('') ?>
<span class="reviewtab">
<?php
// echo count($_items);
?>
Ratings & Reviews
</span>
</h2>
<?php echo $this->getChildHtml('toolbar') ?>
</div>
<dl>
<?php foreach ($_items as $_review):?>
<dt>
<a href="<?php echo $this->getReviewUrl($_review->getId()) ?>">
<?php echo $this->escapeHtml($_review->getTitle()) ?>
</a>
</dt>
<dd>
<?php $_votes = $_review->getRatingVotes(); ?>
<?php echo nl2br($this->escapeHtml($_review->getDetail())) ?>
<?php if (count($_votes)): ?>
<table class="ratings-table">
<colgroup>
<col class="review-label" />
<col class="review-value" />
</colgroup>
<tbody>
<?php foreach ($_votes as $_vote): ?>
<tr>
<th><?php echo $this->escapeHtml($_vote->getRatingCode()) ?></th>
<td>
<div class="rating-box">
<div class="rating" style="width:<?php echo $_vote->getPercent() ?>%;"></div>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<span class="review-meta">
<?php echo $this->__('Review by %s', $this->escapeHtml($_review->getNickname())) ?>
/
<?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?>
</span>
</dd>
<?php endforeach; ?>
</dl>
<?php // echo $this->getChildHtml('toolbar') ?>
<?php elseif($this->getParentBlock()): ?>
<?php echo $this->getParentBlock()->getReviewsSummaryHtml($this->getProduct(), 'short', true)?>
<?php endif;?>
<?php echo $this->getChildHtml('review_form') ?>
</div>
當我用CSS試過,它沒有爲我工作。
我試過交換代碼,但它對我也不起作用。我通過交換做錯了嗎?
請幫我找到解決辦法。
在此先感謝
現在我看不到'stars'。您可以在「評論」標籤下查看[此處](http://sbdev2.kidsdial.com/vintage-retro-bicycle-background-apple-iphone-4-phone-case.html)。 – fresher
我編輯了代碼。請現在嘗試。 – Twinkal
非常感謝.... – fresher