how do I add tabs to the product page? I see there are three at the moment, I want to add a reviews tab instead of the link and other peoples reviews. Also how do I change the order of these tabs?
3 answers
If you want to add a reviews tab instead of the link and other peoples reviews, please edit this file: ..\app\design\frontend\default\jm_hawkstore\layout \catalog.xml
After the code:
Code:
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
Please add this code (At line 210):
Code:
<block type="review/product_view_list" name="product_reviews" as="product_reviews" template="review/product/view/list.phtml" />
Thats awesome thanks!
Is it possible to add the add review page as well? Or can we reorder the tabs? and add an if statement so if there is a review show the reviews first, if not show the add review tab lost.
Thank you very much!
To add tab on review page like detail page, please open the file: ..\app\design\frontend\default\jm_hawkstore\layout review.xml
After the code (at line 98):
Code:
<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>
Add this code:
Code:
<block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" /> <block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml"> <action method="addToParentGroup"><group>detailed_info</group></action> </block> <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml"> <action method="addToParentGroup"><group>detailed_info</group></action> </block>
You can find out more how to add custom tab to product detail page at:
http://www.joomlart.com/documentatio…abs-to-product
Hope it helps.