How to add Review form to Magento Product Review Tabs
If you are looking to add magento reviews form to your product page review tab, here is the step by step instructions for that.
Step:1 open: review.xml, in your “layout” directory.
Find following section:
<block type="review/product_view_list" name="product.reviews" as="reviews" template="review/product/view/list.phtml" after="additional">
Add the following inside this block:
<block type="review/form" name="product.review.form" as="review_form"/>
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data_review" template="review/product/view/reviews-in-tab.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
So your final result should be as...
<catalog_product_view>
<reference name="product.info">
<block type="review/product_view_list" name="product.reviews" as="reviews" template="review/product/view/list.phtml" after="additional">
<action method="addToParentGroup"><group>detailed_info</group></action>
<action method="setTitle" translate="value"><value>Reviews</value></action>
<block type="review/form" name="product.review.form" as="review_form"/>
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data_review" template="review/product/view/reviews-in-tab.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
</block>
</reference>
</catalog_product_view>
Now clear your cache and check output.
Step:1 open: review.xml, in your “layout” directory.
Find following section:
<block type="review/product_view_list" name="product.reviews" as="reviews" template="review/product/view/list.phtml" after="additional">
Add the following inside this block:
<block type="review/form" name="product.review.form" as="review_form"/>
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data_review" template="review/product/view/reviews-in-tab.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
So your final result should be as...
<catalog_product_view>
<reference name="product.info">
<block type="review/product_view_list" name="product.reviews" as="reviews" template="review/product/view/list.phtml" after="additional">
<action method="addToParentGroup"><group>detailed_info</group></action>
<action method="setTitle" translate="value"><value>Reviews</value></action>
<block type="review/form" name="product.review.form" as="review_form"/>
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data_review" template="review/product/view/reviews-in-tab.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
</block>
</reference>
</catalog_product_view>
Now clear your cache and check output.
Please support us, Like us on Facebook.
Subscribe to:
Post Comments (Atom)
Great, this is very useful to me !!
ReplyDeleteThanks