1

I've been trying (in vain) to add another tab to my product information page accordian. I've got an image as an example:

http://tinypic.com/r/246q1rl/8

I've been trying to add another tab (where the red block indicates), is there anyway of doing this? I'm trying to get this on all of my products.

Any help would be greatly appreciated!

3

For example if you want to add tabs that will give you main description, a secondary description and then another tab that will have specific vehicle fitment data.

it's pretty easy. First of all you need to create phtml file for your new tab. Let it be info.phtml. Then add tab init section to xml file (as described in the article):

<action method="addTab" module="catalog" translate="title">
    <alias>info</alias>
    <title>Info</title>
    <block>catalog/product_view_attributes</block>
    <template>catalog/product/view/info.phtml</template>
</action>

Inside of the phtml file you need to call:

<?php $product = $this->getProduct() ?>

Now you are able to output any product's attribute in this file: Description:

<?php echo $product->getDescription() ?>

Special Price:

<?php echo $product->getSpecialPrice() ?>

if you want to read in detail you can go throw link

Please also navigate this link hope this definitely do help you:

http://www.atwix.com/magento/adding-tabs-on-the-product-page/
2

I think this depends very much on the theme you are using.
But if you theme is somehow similar with the modern theme that magento comes with out of the box here is how you can do it.

Add this in any layout file (local.xml of your theme should do).

<catalog_product_view>
    <reference name="product.info.tabs">
        <action method="addTab" translate="title" module="catalog">
             <alias>tab_alias_here</alias><title>Tab title here</title>
             <block>[module]/[block]_[alias]_[here]</block>          
             <template>path/to/template.phtml</template>
        </action>
    </reference>
</catalog_product_view>

For testing purposes use core/template instead of [module]/[block]_[alias]_[here] and just create a simple template that outputs something like It works!!! and use it in the xml above.

If this doesn't work, then it means you theme is a bit different, and you should check how the other tabs are added. catalog.xml of your theme is the place to start. Look in the layout handle catalog_product_view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.