0

I need to set a new tab in my page product view in frontend for only my CUSTOM type of product, i have tried: copy the catalog.xml from /theme/layout and paste in my theme/layout, and inserted my custom product:

<PRODUCT_TYPE_virtual translate="label" module="catalog">
    <label>Catalog Product View (Virtual)</label>
    <reference name="product.info">
        <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
            <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
                <label>Product Extra Info</label>
            </block>
        </block>
    </reference>
</PRODUCT_TYPE_virtual>
    <PRODUCT_TYPE_incomm_virtual translate="label" module="catalog">
    <label>Catalog Product View (Incomm Virtual)</label>
    <reference name="product.info">
        <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
            <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
                <label>Product Extra Info</label>
            </block>
        </block>
    </reference>
</PRODUCT_TYPE_incomm_virtual>

and calls in my another catalog.xml in subfolder from layout, with this:

<?xml version="1.0"?>
<layout version="0.1.0">
    <PRODUCT_TYPE_incomm_virtual translate="label" module="catalog">
        <block type="catalog/product_view_attributes" name="incomm_termos" as="termos" template="fourward/incomm/product/view/termos.phtml">
            <action method="addToParentGroup"><group>detailed_info</group></action>
            <action method="setTitle" translate="value"><value>Terms of Use</value></action>
        </block>
    </PRODUCT_TYPE_incomm_virtual>
</layout> 

but nothing happens, i need to create a new tab after description product and i prefer to make in code and only for my custom type of product. how i have to do? i have follows the http://twincreations.co.uk/add-custom-product-tab-in-magento-1-9-ce/ but i dont know how to use in multiples ways (filtered for type of product). thanks

1

You forgot the <reference name="product.info"> in your layout. So your block is added in the page but it not associated to the tabs section.

Try it like this:

<layout version="0.1.0">
    <PRODUCT_TYPE_incomm_virtual translate="label" module="catalog">
        <reference name="product.info">
            <block type="catalog/product_view_attributes" name="incomm_termos" as="termos" template="fourward/incomm/product/view/termos.phtml">
                <action method="addToParentGroup"><group>detailed_info</group></action>
               <action method="setTitle" translate="value"><value>Terms of Use</value></action>
            </block>
        </reference>
    </PRODUCT_TYPE_incomm_virtual>
</layout> 
| improve this answer | |
  • <PRODUCT_TYPE_incomm_virtual \translate="label" module="catalog"> (slash) will not work in xml :( – liyakat May 20 '15 at 7:46
  • @liyakat. Sorry. I have big fingers. It was a typo :) – Marius May 20 '15 at 7:52
  • Marius.. Don't be..You are always Perfect.+1 for me. – liyakat May 20 '15 at 8:14

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.