I created the attached patch to add prepopulation support for the phone number fields provided by https://drupal.org/project/addressfield_phone but it's not working and I'm not sure why. I see that the values are being found in the user profile, and that the form array is being populated with the values, but they don't display on the checkout page.

Could you please take a look at this and tell me if I may be overlooking something obvious?

Comments

cameron prince’s picture

Title: Add support for Address Field Phone to Commerce Extra Address Populate » Add support for Address Field Phone to Commerce Extra Address Populate w/ patch
Category: support » feature
Status: Active » Needs review
StatusFileSize
new1.41 KB

Here's a working patch against the latest dev version.

cameron prince’s picture

The patch in #1 won't apply due to a header problem. Here's a replacement.

5n00py’s picture

Ok, I will review and test it later.

5n00py’s picture

I did a lot of code research around commerce_extra, addressfield_phone and addressfield.
I think problem is in the last one.

Addressfield module do not provide api for defining empty address & addressfield_phone module do not provide form processor.

Good point to start resolving this issue is : #1225292: Add a hook to determine what address components get rendered by Address Field.

As for patch in #2, it do not solve problem at all, only for phone field, we need generic solution.

5n00py’s picture

Status: Needs review » Closed (duplicate)

Ok, now I fix this issue in addressfield_phone module, so wee need to test and commit patch from next issue:
#2121651: Better form processing

@cameronbprince, test my patch and leave some feedback. Thanks!

I mark this issue as duplicate, so follow #2121651: Better form processing!