magento - Afficher des revues de produit dans le résumé de l'examen des

Je suis en train de redessiner le résumé de l'examen pour la page du produit, de sorte qu'il affiche la liste des commentaires et le formulaire pour ajouter un nouvel examen.

La forme des œuvres, mais la liste n'. J'ai ajouté le résumé de la vue.phtml comme ceci:

<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>

Mon résumé.phtml fichier renvoie cette erreur:

Fatal error: Call to a member function getItems() on a non-object in /home/content/41/6755141/html/keepwell/buy/app/design/frontend/fvm/default/template/review/helper/summary.phtml

pour cette ligne:

<?php $_items = $this->getReviewsCollection()->getItems();?>

Mon résumé.phtml fichier ressemble à ceci:

<div id="column-one-left">
<?php if ($this->getReviewsCount()): ?>
<p class="title-noline"><?php echo $this->__('Customer Reviews') ?></p>
<div id="customer-reviews">
<?php $_items = $this->getReviewsCollection()->getItems();?>
<?php if (count($_items)):?>
<?php echo $this->getChildHtml('toolbar') ?>
<dl>
<?php foreach ($_items as $_review):?>
<div class="review">
<p class="review-title"><?php echo $this->htmlEscape($_review->getTitle()) ?></p>
<p class="review-name"><?php echo $this->__('by <span>%s</span>', $this->htmlEscape($_review->getNickname())) ?></p>
<p class="review-body"><?php echo nl2br($this->htmlEscape($_review->getDetail())) ?></p>
</div>
<hr class="review" />
<dt>
<a href="<?php echo $this->getReviewUrl($_review->getId()) ?>"><?php echo $this->htmlEscape($_review->getTitle()) ?></a> 
</dt>
<dd>
<?php $_votes = $_review->getRatingVotes(); ?>
<?php if (count($_votes)): ?>
<table class="ratings-table">
<col width="1" />
<col />
<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; ?>
<?php echo nl2br($this->htmlEscape($_review->getDetail())) ?>
<small class="date"><?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?></small>
</dd>
<?php endforeach; ?>
</dl>
<?php echo $this->getChildHtml('toolbar') ?>
<?php endif;?>
<div class="review">
<p class="review-title">This is the Review Title /Summary</p>
<p class="review-name">by John Q. Doe</p>
<p class="review-body">Nunc hendrerit, nisi eget adipiscing hendrerit, enim mauris elementum nibh, nec ornare nisi neque in quam. Vivamus ac ligula a felis hendrerit euismod. Etiam condimentum semper massa, ac bibendum diam lacinia ut. Nullam porttitor porttitor mi in sodales. Ut a vestibulum eros.</p>
</div>
<hr class="review" />
</div>
<hr/>
<hr/>
<div class="ratings">
<?php if ($this->getRatingSummary()):?>
<div class="rating-box">
<div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
</div>
<?php endif;?>
<p class="rating-links">
<a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?></a>
<span class="separator">|</span>
<a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Add Your Review') ?></a>
</p>
</div>
<?php elseif ($this->getDisplayIfEmpty()): ?>
<p class="title-noline"><?php echo $this->__('Be the first to review this product') ?> >></p>
<?php endif; ?>
</div>
<div id="column-one-right">
<?php  echo $this->getLayout()->createBlock('review/form')->setBlockId('product.review.form')->toHtml();  ?>
</div>

OriginalL'auteur Stephen M. Harris | 2011-07-14