0

How can I show a detailed list of respective product reviews at the end of product detail pages? I used this code at view.phtml

<?php if($_product->getRatingSummary()): ?>
    <?php echo $this->getReviewsSummaryHtml($_product) ?>
<?php endif; ?>

But it is showing only short summary (like number of reviews) instead of detailed review summary.

I mm using the RWD theme.

1 Answer 1

3

Finally I found the answer for my question. :)

Step1 add this code on local.xml

<catalog_product_view>
    <reference name="content">
        <reference name="product.info">
            <block type="review/product_view_list" name="product.info.product_additional_data" as="reviews" template="review/product/view/list.phtml">
                <block type="review/form" name="product.review.form" as="review_form">
                    <block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
                        <label>Review Form Fields Before</label>
                        <action method="setMayBeInvisible"><value>1</value></action>
                        <action method="setElementClass"><value>rewards</value></action>
                    </block>
                </block>
            </block>
        </reference>
    </reference>
</catalog_product_view>

Step2 Call it from view.phtml

<?php echo $this->getChildHtml('reviews') ?>

Maybe it will be helpful for upcoming newbies like me in the future :)

Source https://gist.github.com/bekapod/5395583

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.