【发布时间】:2016-04-04 14:25:28
【问题描述】:
我在 adminhtml 目录产品页面中创建选项卡意见。
我希望我的标签“意见”在标签列表中排在第一位。
app/code/local/Fishpig/Customtabs/Block/Adminhtml/Catalog/Product/Tab.php
类 Fishpig_Customtabs_Block_Adminhtml_Catalog_Product_Tab 扩展 Mage_Adminhtml_Block_Template 实现 Mage_Adminhtml_Block_Widget_Tab_Interface {
public function _construct()
{
parent::_construct();
$this->setTemplate('customtabs/catalog/product/tab.phtml');
}
public function getTabLabel()
{
return $this->__('Opinion');
}
public function getTabTitle()
{
return $this->__('Click here to view your custom tab content');
}
public function canShowTab()
{
return true;
}
public function isHidden()
{
return false;
}
app/design/adminhtml/default/default/layout/customtabs.xml *
<layout>
<adminhtml_catalog_product_edit>
<reference name="product_tabs">
<action method="addTab">
<name>opinion</name>
<block>customtabs/adminhtml_catalog_product_tab</block>
</action>enter code here
</reference>
</adminhtml_catalog_product_edit>
</layout>
*
【问题讨论】:
标签: magento magento-1.9 magento-1.8