John Burgess
John Burgess

Reputation: 141

Magento changing block titles

enter image description here

I want to change the titles of the Tabs in the Accordian at the bottom. I no longer want "Additional Info" I want "Product specs"

I also want to change where it says "Related" and have it say "Add A Garage Stop"

Magento 1.9.3.3

Upvotes: 1

Views: 1153

Answers (1)

Vladimir Samsonov
Vladimir Samsonov

Reputation: 1329

Tabs on product page are defined in layout xml

/app/design/frontend/base/default/layout/catalog.xml

            <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>
                <action method="setTitle" translate="value"><value>Additional Information</value></action>
            </block>

Related products are defined in template app/design/frontend/base/default/template/catalog/product/list/related.phtml

<div class="block block-related">
    <div class="block-title">
        <strong><span><?php echo $this->__('Related Products') ?></span></strong>
    </div>

if you use custom theme replace base/default with your theme path. If files do not exist in custom theme, you can safely copy them over with same paths

UPDATE

You can use local.xml file of your theme to change tab title

/app/design/frontend/(YOUR THEME PATH)/layout/local.xml

<catalog_product_view>
    <reference name="product.info">
         <remove name="product.attributes"/>
         <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>
        <action method="setTitle" translate="value"><value>Product specs</value></action>
        </block>
    </reference>
</catalog_product_view>

(will only work if your Theme behaves like default magento theme)

Upvotes: 1

Related Questions