How to add Magento Product Review form anywhere on product page
If you want to add magento product review form anywhere on your product page instead of review tab just add following simple code.
Step1: open: catalog.xml in your “layout” directory. Find this section:
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
Step2: Add the following after above line:
Step1: open: catalog.xml in your “layout” directory. Find this section:
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
Step2: Add the following after above line:
<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>
Step3: Now call following code where you want to display review form:
<?php echo $this->getChildHtml('product_additional_data_review') ?>
<?php echo $this->getChildHtml('review_form') ?>
Note: if you want to display review form in your product tab, click here
Please support us, Like us on Facebook.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment