Possible Duplicate:
how to add review tab on product view page
How to display review form as well as reviews in a tab in product page . I was doing the following in catalog.xml
<!--action method="addTab" translate="title" module="catalog"><alias>review</alias><title>Review</title><block>review/product_view_list</block><template>review/product/view/list.phtml</template></action--> <!--For getting the review datails-->
<action method="addTab" translate="title" module="catalog"><alias>review</alias><title>Review</title><block>review/form</block><template>review/form.phtml</template></action> <!--For displaying review form-->
This is how I handled this situation in one of my projects:
Add tab with reviews
Now, the review form is handled by the different type of block which normally is a sub-block of review page. There is no way to make nested block with
addTab
action but you can use<reference>
handler after creating review block in tabs like this:name
in<reference>
handler must be equal to what is in<alias>
inaddTab
actionAnd in
catalog/product/view/tabs/reviews.phtml
you just useYou can use
<reference>
handler to add more block to review list and review form.Of course, you have to create files for review list and review form in the paths entered in
template
argument, so in this case you would need to createcatalog/product/view/tabs/reviews.phtml
andcatalog/product/view/tabs/review_form.phtml
. You can change review form template to the default onereview/form.phtml
if you do not need change the code there or you will be using it only in that tab but review list might need more changes in html structure so it is good idea to create separate file for it and use parts of the default code as needed.