我正在制作一个内部Magento扩展,我想在客户概述中添加几个关键数字,即/admin/customer/edit/id/XXX页面:

如何才能做到这一点?我试着在知识库中查找,等等,但是关于创建扩展的文档似乎相当有限。
Magento版本为1.6.x。
发布于 2011-12-11 20:43:47
启动模块的最快方法是使用the module creator。它添加的其中一个文件将是a config,并为此添加以下内容...
<config>
<!-- ...existing XML here... -->
<adminhtml>
<layout>
<updates>
<your_module_name>
<file>yourmodule.xml</file>
</your_module_name>
</update>
</layout>
</adminhtml>
</config>这将导致加载文件app/design/adminhtml/default/default/layout/yourmodule.xml,您可以向该文件中添加一条指令...
<layout>
<adminhtml_customer_edit>
<reference name="customer_edit_tab_view">
<block type="adminhtml/template" template="your/module/customer/view.phtml" name="your_module_view" />
</reference>
</adminhtml_customer_edit>
</layout>这将添加(最后一部分,我保证)到客户编辑页面下面的现有部分的块。它将显示您必须创建并填充的app/design/adminhtml/default/default/template/your/module/customer/view.phtml的内容,可能有点像这样……
<!-- Display a nice header around a box -->
<div class="entry-edit">
<div class="entry-edit-head"><h4><?php echo $this->__('Your Module Info') ?></h4></div>
<fieldset>
Your information will show here.
</fieldset>
</div>
</div>这种方式是安全的,没有升级可以覆盖你的添加,因为所有的文件路径都会在它们的某个地方包含你的模块名称。
https://stackoverflow.com/questions/8463041
复制相似问题