3

Currently for "Address" pane (field named "commerce_customer_address") available two options:

1) Name (First name, Last name) 2) Name (single line)

In my country middle name is very important. How to add this as separated field from custom module?

To Rayan: By the way, does it make sense to include this option in the Commerce core?

4 Answers 4

1

I have a similar issue with the dynamic address form, in that I want to replace the "county" textfield with a drop down of all counties without having to add it as a new additional field underneath the dynamic address form widget. Is there any way to amend the dynamic address form widget? The closed I can get in to it is at: admin/commerce/customer-profiles/types/billing/fields/commerce_customer_address/widget-type

3

You can add the field under store -> customer profiles -> profile types -> Billing Information -> Manage Fields (Or go to admin/commerce/customer-profiles/types/billing/fields)

You can add any additional fields there. You can't add any fields directly to customer_commerce_address, but if you add any fields under the Billing Information they will show up during checkout.

1
  • 1
    Yes, this is obvious solution, but I'd like to have the field inside "Address" pane
    – volocuga
    Commented Aug 11, 2011 at 2:26
2

You have to create a plugin for the address field, that you can use to extend the form. This is how the different selections like single name form vs first and last name form.

You have one challenge in doing this: the address field has not support for storing middle names. The reason is most likely that middle names are considered to be first names.

-2

You should use the Extra Fields Checkout Pane module.

1
  • The question is about Drupal Commerce, not Ubercart. And the challenge is to make the extra field combine with the existing name fields, which this approach would not solve (e.g. commerce_fieldgroup_panes wouldn't help either).
    – arjan
    Commented Nov 27, 2013 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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