Magento 更改块标题

Magento changing block titles

我想更改底部手风琴中选项卡的标题。我不再想要 "Additional Info" 我想要 "Product specs"

我也想把 "Related" 改成 "Add A Garage Stop"

Magento 1.9.3.3

产品页面上的选项卡在布局中定义 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>

相关产品在模板中定义 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>

如果您使用自定义主题,请将 base/default 替换为您的主题路径。如果自定义主题中不存在文件,您可以使用相同的路径安全地复制它们

更新

您可以使用主题的 local.xml 文件来更改选项卡标题

/app/design/frontend/(您的主题路径)/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>

(仅当您的主题表现得像默认的 magento 主题时才有效)