1

i am using Craft Commerce 4 and cannot get my head around how to add a phone number to a customers address at Checkout. I have a Commerce 3 site but the code does not work. I can see how to add a custom field to the Settings > User Settings > Address in admin but is there no longer a native phone field for an address?

Any pointers?

1 Answer 1

2

Not sure what the problem is here, since you already mentioned the solution. Addresses in Craft 4 have a field layout, so you can add any fields you want to them. There are some native properties you can add (organization, fullName, etc), but a phone number isn't one of them. To add a phone number to every address, first create a custom field (either a text field or a phone number field). Then go to Settings -> Users -> Address Fields and add the phone number to the field layout.

2
  • 2
    Thanks, i guess i was just trying to figure out if i was missing something and if a custom field was now the proper way of doing it - thank you for confirming that - much appreciated Apr 21 at 10:52
  • 1
    @MalcolmMaclean Absolutely, it's always good to use what's available! If your question is solved, don't forget to mark the answer as accepted. Thanks!
    – MoritzLost
    Apr 21 at 12:54

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.