承接上篇控制器
下面开始写etc配置文件
app\code\local\Iverve\Uploadpdf\etc
app\code\local\Iverve\Uploadpdf\etc\config.xml
<?xml version="1.0"?>
<config>
<modules>
<Iverve_Uploadpdf>
<version>0.1.0</version>
</Iverve_Uploadpdf>
</modules>
<frontend>
<routers>
<uploadpdf>
<use>standard</use>
<args>
<module>Iverve_Uploadpdf</module>
<frontName>uploadpdf</frontName>
</args>
</uploadpdf>
</routers>
<layout>
<updates>
<uploadpdf>
<file>iverve/uploadpdf/uploadpdf.xml</file>
</uploadpdf>
</updates>
</layout>
</frontend>
<global>
<helpers>
<uploadpdf>
<class>Iverve_Uploadpdf_Helper</class>
</uploadpdf>
</helpers>
<events>
<controller_action_predispatch>
<observers>
<iverve_uploadpdf_installation_check>
<class>Iverve_Uploadpdf_Model_Observer</class>
<method>checkInstallation</method>
</iverve_uploadpdf_installation_check>
</observers>
</controller_action_predispatch>
</events>
<blocks>
<uploadpdf>
<class>Iverve_Uploadpdf_Block</class>
</uploadpdf>
<adminhtml>
<rewrite>
<catalog_product_edit_tabs>Iverve_Uploadpdf_Block_Adminhtml_Catalog_Product_Edit_Tabs</catalog_product_edit_tabs>
</rewrite>
</adminhtml>
</blocks>
<models>
<uploadpdf>
<class>Iverve_Uploadpdf_Model</class>
<resourceModel>uploadpdf_mysql4</resourceModel>
</uploadpdf>
<uploadpdf_mysql4>
<class>Iverve_Uploadpdf_Model_Mysql4</class>
<entities>
<uploadpdf>
<table>iverve_uploadpdf</table>
</uploadpdf>
<extensioncheck>
<table>iverve_extensions</table>
</extensioncheck>
</entities>
</uploadpdf_mysql4>
</models>
<resources>
<uploadpdf_setup>
<setup>
<module>Iverve_Uploadpdf</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</uploadpdf_setup>
<uploadpdf_write>
<connection>
<use>core_write</use>
</connection>
</uploadpdf_write>
<uploadpdf_read>
<connection>
<use>core_read</use>
</connection>
</uploadpdf_read>
</resources>
</global>
<adminhtml>
<events>
<catalog_product_save_after>
<observers>
<iverve_save_product_data>
<type>singleton</type>
<class>uploadpdf/observer</class>
<method>saveProductTabData</method>
</iverve_save_product_data>
</observers>
</catalog_product_save_after>
</events>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<system>
<children>
<config>
<children>
<uploadpdf translate="title" module="uploadpdf">
<title>Iverve-Upload PDF</title>
<sort_order>50</sort_order>
</uploadpdf>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</adminhtml>
</config>
下面是该模块的帮助类Helper
app\code\local\Iverve\Uploadpdf\Helper
app\code\local\Iverve\Uploadpdf\Helper\Data.php
class Iverve_Uploadpdf_Helper_Data extends Mage_Core_Helper_Abstract
{
}