这是我的模块的config.xml文件的代码.看看代码并建议我错在哪里.我是magento的新手,并不太了解配置文件中使用的声明.任何帮助将不胜感激.
<?xml version="1.0"?> <config> <global> <models> <xyz_xyzshipping> <class>Xyz_Xyzshipping_Model</class> <resourceModel>xyz_xyzshipping_resource</resourceModel> </xyz_xyzshipping> <xyz_xyzshipping_resource> <class>Xyz_xyzshipping_Model_Resource</class> <entities> <custom> <table>xyz_xyzshipping_custom</table> </custom> </entities> </xyz_xyzshipping_resource> </models> <resources> <xyz_xyzshipping_setup> <setup> <module>Xyz_Xyzshipping</module> </setup> </xyz_xyzshipping_setup> </resources> <blocks> <xyz_xyzshipping> <class>Xyz_Xyzshipping_Block</class> </xyz_xyzshipping> </blocks> <helpers> <xyz_xyzshipping> <class>Xyz_Xyzshipping_Helper</class> </xyz_xyzshipping> </helpers> </global> <default> <carriers> <xyz_xyzshipping> <active>1</active> <sort_order>10</sort_order> <model>xyz_xyzshipping/carrier</model> <title>Xyz Shipping</title> <sort_order>10</sort_order> </xyz_xyzshipping> </carriers> </default> </config>
解决方法
您需要使用包含sql代码的安装程序脚本.
您可以参考以下链接
http://www.amitbera.com/create-an-magento-extension-with-custom-database-table/
这是使用自定义表创建基本扩展的教程.