5

This question already has an answer here:

Here is my code.

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

marked as duplicate by Rajeev K Tomy, Keyul Shah, David Manners, Marius, Anna Völkl Oct 30 '14 at 15:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

  • 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. – Praful Rajput Oct 30 '14 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" – Nasir Perwaiz Oct 30 '14 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.