xml – 添加所有代码后,不会创建magento中的自定义表

这是我的模块的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/

这是使用自定义表创建基本扩展的教程.

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念