5

Here is my code.

<global>
    <fieldsets>
        <customer_account>
          <customeattribute>
            <create>1</create>
            <update>1</update>
            <name>1</name>
          </customattribute>
        </customer_account>
    </fieldsets>
</global>
0

2 Answers 2

8

The <fieldsets> tag is basically used to define attributes that will be copied from one place to another. For example, while converting quote object to order object, the attributes that needs to move to order is listed below like,

<sales_convert_quote>
                <remote_ip>
                    <to_order>*</to_order>
                </remote_ip>
                <x_forwarded_for>
                    <to_order>*</to_order>
                </x_forwarded_for>
                <customer_id>
                    <to_order>*</to_order>
                </customer_id>
                <customer_email>
                    <to_order>*</to_order>
                </customer_email>
                <customer_prefix>
                    <to_order>*</to_order>
                </customer_prefix>
                <customer_firstname>
                    <to_order>*</to_order>
                </customer_firstname>
                <customer_middlename>
                    <to_order>*</to_order>
                </customer_middlename>
                <customer_lastname>
                    <to_order>*</to_order>
                </customer_lastname>
               <...........>
</sales_convert_quote>

The above code has been taken from the file app/code/core/Mage/Sales/etc/config.xml

Hope this helps. Thanks.

2
  • Following code syntax is different. <customeattribute> <create>1</create> <update>1</update> <name>1</name> </customattribute> while you mentioned the * between <remote_ip> <to_order>*</to_order> </remote_ip> So I get confused. Oct 30, 2014 at 8:46
  • Yes, this syntax that you have mentioned is for adding new customer attributes. Here your have added one attribute with the name "customattribute" Oct 30, 2014 at 9:45
0

<fieldsets> tag is generally used to define which fields (attributes) are to be copied to where while converting objects to object,

Not the answer you're looking for? Browse other questions tagged or ask your own question.