0

I'm overriding this Block: Mage_Adminhtml_Block_Sales_Order_Create_Form_Address. But it cannot make it work, I'm stuck. Please see as below my code.

My config.xml in app/code/community/Urmagento/Orderaddress/etc/config.xml:

<config>
<modules>
    <Urmagento_Orderaddress>
        <version>0.1.0</version>
    </Urmagento_Orderaddress>
</modules>
<global>
    <models>
        <orderaddress>
            <class>Urmagento_Orderaddress_Model</class>
        </orderaddress>
    </models>
    <helpers>
        <orderaddress>
            <class>Urmagento_Orderaddress_Helper</class>
        </orderaddress>
    </helpers>
    <resources>
        <orderaddress_setup>
            <setup>
                <module>Urmagento_Orderaddress</module>
            </setup>
        </orderaddress_setup>
    </resources>
    <blocks>
        <adminhtml>
            <rewrite>
                <sales_order_create_form_address>Urmagento_Orderaddress_Block_Adminhtml_Form_Address</sales_order_create_form_address>
            </rewrite>
        </adminhtml>
    </blocks>
</global>

My Urmagento_Orderaddress.xml in app/etc/modules:

<config>
<modules>
    <Urmagento_Orderaddress>
        <active>true</active>
        <codePool>community</codePool>
    </Urmagento_Orderaddress>
</modules>

My Address.php in app/code/community/Urmagento/Orderaddress/Block/Adminhtml/Form:

class Urmagento_Orderaddress_Block_Adminhtml_Form_Address extends Mage_Adminhtml_Block_Sales_Order_Create_Form_Address{ }

Can anybody help me ????

4

1 回答 1

3

添加路径时,您没有创建块文件夹

app/code/community/Urmagento/Orderaddress/Adminhtml/Form:

它应该是

app/code/community/Urmagento/Orderaddress/Block/Adminhtml/Form 

编辑

或查看此http://www.magentocommerce.com/boards/viewthread/223637/

希望对你有帮助

于 2013-11-11T07:15:42.873 回答