How to add more tabs on product-collateral of product view page

Step1: Add the code in catalog.xml file

path:app/design/frontend/yourtheme/default/layout/

<catalog_product_view>
   <block type="catalog/product_view_description" name="product.faq" as="faq" template="catalog/product/view/faq.phtml">
	<action method="addToParentGroup"><group>detailed_info</group></action>
	<action method="setTitle" translate="value"><value>Frequently Asked Questions(Tab Dispaly Value)</value></action>
    </block>
</catalog_product_view>

Note: name =”product.your_template_name” template=”catalog/product/view/new_template_file” create the new template file in this path and saved

Step2: Created the New Attribute Template file example:faq.phtml

<?php  $faq = $this->getProduct()->getFrequentlyQuestions(); ?>
 
<?php if ($faq): ?>
    <h2><?php echo $this->__('Frequently Asked Questions') ?></h2>
    <div class="std">
        <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $faq, 'faq') ?>
    </div>
<?php endif; ?>

Note: getFrequentlyQuestions() = get’attributeID'()

Leave a Reply

Your email address will not be published. Required fields are marked *