Magento: Merge Product Description and Addition Information Tab

偶尔善良 提交于 2019-12-18 03:49:07

问题


I am using Modern theme which separates all information into tabs.

I want to merge some of the tabs as visitors hate clicking.

Spent hours searching but can't fine one that actually works.

Here is example of what I want to achieve.

http://www.teasta.com/chocolate-mint-rooibos-herbal-tea-4oz-tin.html

You can see description appears just above the Additional information (attributes)

How do I do this in Magento 1.7.0?

Thanks.


回答1:


For Remove Additional Information Tab comment following code from catalog.xml

<action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>  

For display Additional Information in Product Description Tab paste following code in
"catalog/product/view/description.phtml" file.

<?php echo $this->getLayout()->createBlock('catalog/product_view_attributes', '', array('template'=> 'catalog/product/view/attributes.phtml'))->toHtml(); ?>

Best Luck !!




回答2:


As far as I know the tabs are added via the layout xml (see catalog.xml) in your package by the method "addTab".

Example:

<action method="addTab" translate="title" module="catalog"><alias>upsell_products</alias><title>We Also Recommend</title><block>

You could comment that line in catalog.xml and edit app/design/frontend/your_package/default/catalog/product/view.phtml and echo the information you want ;)




回答3:


My settings were inside /app/design/frontend/mytheme/default/layout/local.xml changing what's inside the title tags

<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >

            <!-- Product description -->
            <action method="addTab" translate="title" module="catalog"><alias>description</alias><title>Description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action>

            <!-- Product attributes -->
            <action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Specifications</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>


来源:https://stackoverflow.com/questions/12489287/magento-merge-product-description-and-addition-information-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!