0

In Drupal 8, the Commerce Core module has a step after the customer selects checkout.

Left in the screen there is the payment information which contains a form with:

  • Country
  • Company
  • First and last name
  • Street address
  • Postal code
  • City

We only want:

  • Country
  • First and last name

I implemented hook_form_alter() but the form retrospection gives me no clue on which field I can adjust.

I also checked in the profile if there is any option, but I could not find them.

Do you have any suggestion?

1 Answer 1

0

You need to edit the address field on the Customer profile type.

See admin/config/people/profiles/manage/customer/fields/profile.customer.address

In more recent versions of Commerce this can be found under admin/config/people/profile-types/manage/customer/fields/profile.customer.address

2
  • thxs, but this field is locked. I delete all customers already but fields keeps unlocked. Any suggestion?
    – Justme
    Aug 27, 2018 at 9:42
  • As mentioned elsewhere, you need to run a recent Commerce version (2.7 or newer, in this case). Aug 28, 2018 at 11:23

Your Answer

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

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