1

under my theme's config.xml, below layout block used to trigger product reviews and it's form.

<reference name="content">
.............
<block type="review/product_view_list" name="review.list" as="review_list" 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>
    </block>
  </block>
</block>
</reference>

and using <?php echo $this->getChildHtml('review_list') ?> in my themes product/view.phtml to display review with review form.

Now i'm trying to use <?php echo $this->getChildHtml('review_list') ?> in product/view/description.phtml but it's showing empty.

Any solution to solve this ?

1 Answer 1

0

In you lauout xml file add review block as a child to description block under catalog_product_view handler.

<catalog_product_view>
    <reference name="product.description">
        <block type="review/product_view_list" name="review.list" as="review_list" 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>
                </block>
             </block>
        </block>
    </reference>
</catalog_product_view>
2
  • Thanks oleksii.svarychevskyi it worked. But one small bug after adding this, i'm getting one new empty tab titled Customer reviews Mar 5, 2014 at 10:57
  • I don't know the exact problem, but it shout be connected with html code of review block. Try to investigate app\design\frontend\base\default\template\review\product\view\list.phtml. Mar 5, 2014 at 11:03

Your Answer

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

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