0

According to this example Add new field in magento(1.9) customer registration

How can I show the customer License Number on admin panel order view page (account information tab)?

0

In addition to adding the customer attribute as explained in Add new field in magento(1.9) customer registration you have to add a new attribute on the quote and the order called customer_licence_number. (add them as columns to the tables sales_flat_quote and sales_flat_order). The prefix customer_ is very important.
Then you have to add in the config.xml of you module, under the tags <config><global><fieldsets> this:

<customer_account>
    <licence_number>
        <to_quote>customer_licence_number</to_quote>
    </licence_number>
</customer_account>
<sales_convert_quote>
    <customer_licence_number>
        <to_order>*</to_order>
    </customer_licence_number>
</sales_convert_quote>

this should make magento copy the value of licence_number from the customer to the quote and from the quote to the order.
And because the attribute code starts with customer_ it will be displayed in the order details page right up there with customer name, email, DOB and others.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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