0
votes

This module is for add customer address attribute. Namespace is Thushara and Module name is New

attribute name is contact

In the admin panel the module is showing as activated, but it doesn't add the attribute.

This is the \local\Thushara\New\etc\config.xml

<config>
<modules>
    <Thushara_New>
        <version>0.1.0</version>
    </Thushara_New>
</modules>
<frontend>
    <routers>
        <new>
            <use>standard</use>
            <args>
                <module>Thushara_New</module>
                <frontName>new</frontName>
            </args>
        </new>
    </routers>
    <layout>
        <updates>
            <new>
                <file>new.xml</file>
            </new>
        </updates>
    </layout>
</frontend>
<global>
    <models>
        <new>
            <class>Thushara_New_Model</class>
            <resourceModel>new_mysql4</resourceModel>
        </new>
        <new_mysql4>
            <class>Thushara_New_Model_Mysql4</class>
            <entities>
                <new>
                    <table>new</table>
                </new>
            </entities>
        </new_mysql4>
    </models>
    <resources>
        <new_setup>
            <setup>
                <module>Thushara_New</module>
                <class>Mage_Customer_Model_Entity_Setup</class>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </new_setup>
        <new_write>
            <connection>
                <use>core_write</use>
            </connection>
        </new_write>
        <new_read>
            <connection>
                <use>core_read</use>
            </connection>
        </new_read>
    </resources>
    <blocks>
        <new>
            <class>Thushara_New_Block</class>
        </new>
    </blocks>
    <helpers>
        <new>
            <class>Thushara_New_Helper</class>
        </new>
    </helpers>
 </global>
 <global>
    <fieldsets>
        <sales_convert_quote_address>
                <contact>
                    <to_order_address>*</to_order_address>
                    <to_customer_address>*</to_customer_address>
                </contact>
        </sales_convert_quote_address>
        <customer_address>
                <contact>
                    <to_quote_address>*</to_quote_address>
                </contact>
        </customer_address>
    </fieldsets>
</global>

this is the \local\Thushara\New\sql\new_setup\mysql4-install-0.1.0.php

enter image description here

2
Your columns have been added in the mysql table and it's not showing or your setup files haven't been executed at all ? - dagfr
ok what do you have in Model/Mysql4 ? You have a resource model created ? Could you edit your question and show us ? - dagfr
dagfr can u check this link and give me a help. This is the actual thing i wants to do. Thanks stackoverflow.com/questions/14826734/… - Thushara Mannaperuma

2 Answers

1
votes

Your configuration looks correct. This normally happens if you test something on your module before creating the install script. Check the core_resource table to see if your module is listed. If it is, remove the row, clear your caches and then refresh your page, it should trigger the install script.

0
votes

If you add the setup file in core_resource table ,you should check you new field in the eav_attribute table.