我期待在Magento的添加一个文本输入框在的Magento的管理部分管理类页。是有可能这样做吗?如果是我想知道如何?如果有人能为我提供解决方案,这将会非常有帮助。添加新fileld在Magento管理部分管理类页
在此先感谢
我期待在Magento的添加一个文本输入框在的Magento的管理部分管理类页。是有可能这样做吗?如果是我想知道如何?如果有人能为我提供解决方案,这将会非常有帮助。添加新fileld在Magento管理部分管理类页
在此先感谢
您可以通过在adminhtml模板文件创建文本框做。最有可能的,这将是:
的Magento /应用/设计/ adminhtml /默认/缺省的/模板/目录/分类/编辑/ form.phtml
但你还需要在数据库中保存创建新列数据。您可以通过编写自己的简单扩展和SQL升级脚本来实现此目的。
我认为你正试图在Magento admin中的“管理类别”部分添加一个属性。
要添加一个属性,您需要使用自定义模块运行SQL文件。
这里是代码片段,您可以执行 -
<?php
$installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();
$installer->removeAttribute('catalog_category', 'attribute_code');
$installer->addAttribute('catalog_category', 'attribute_code', array(
'group' => 'General Information',
'type' => 'text',
'label' => 'Attribute Label',
'input' => 'text',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => '',
'visible_on_front' => true,
'is_html_allowed_on_front' => true,
'position' => 4,
'sort_order' => 4,
));
$installer->endSetup();
?>
我希望你正在寻找上面的代码。
我们可以使用代码等
选项,您可以安装以下模块添加属性:
http://www.magentocommerce.com/magento-connect/custom-attributes-4340.html
这是可能的,但不是一件容易的事,你可能已经知道。尝试一些教程。 – luckystars 2013-02-22 05:29:37
可以请你建议我一些教程,可以帮助我,因为我还没有遇到过一个可以帮助我在这 – 2013-02-22 05:32:43
你可以试试这个:http://www.magentocommerce.com/boards/viewthread/ 286643 /,它不完全是你想要做的,但可能会有所帮助。 – luckystars 2013-02-22 06:06:04