[Magento] Add custom tab to product detail page

1. Add the following code to add/design/YOUR_Theme/layout/catalog.xml , below the “description” part

<block type=”catalog/product_view_description” name=”product.description1″ as=”description2″ template=”catalog/product/view/additionalinfo.phtml”>
<action method=”addToParentGroup”><group>detailed_info</group></action>
<action method=”addToParentGroup”><group>detailed_info</group></action>
<action method=”setTitle” translate=”value”><value>Additional Info</value></action>
</block>

 

2. Create the file called additionalinfo.phtml to app/design/YOUR_THEME/template/catalog/product/view/additionalinfo.phtml

 

3. Create an attribute “additionalinfo” and add it to attribute set

댓글 남기기