Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi everyone
Name field is not showing up on /admin/commerce/customer-profiles/list. I changed format handlers to 'Name (First name, Last name)' on /admin/commerce/customer-profiles/types/billing/fields/commerce_customer_address to have separate fields for First name and Last name. I am using PayPal's Website Payment Pro to accept orders.
Thanks in advance
Comments
Comment #1
hasozduru CreditAttribution: hasozduru commentedComment #2
rszrama CreditAttribution: rszrama commentedThis was in the right spot. The issue is that we either need the "Name (First name, Last name)" option to combine the first and last name into the single name line column on save or we need the formatter to be able to use the right data depending on the option selected for name entry.
Comment #3
hasozduru CreditAttribution: hasozduru commentedThanks rszrama
I am not familiar with patches yet so would be great if you could provide one that fixes it.
Comment #5
kgrigsby@mac.com CreditAttribution: kgrigsby@mac.com commentedI use the Address Field module with separate first and last name fields in the user's profile without Commerce. I have a View which displays the users and would like to have a a single filter field that searches on the combined first and last name. As it is right now I have a fields for the first and last name. I think if the combined name was stored on save it would make this possible.
Comment #6
hasozduru CreditAttribution: hasozduru commentedrszrama, any update on this please?
Comment #7
rszrama CreditAttribution: rszrama commentedNone, but it's been annoying me on my site, too. Obviously, this issue will be updated when there's an update.
Comment #8
mediapal CreditAttribution: mediapal commentedOMG I just stumbled into the same issue and here I realize this is going on since 10 Months. C'mon guys please give us a fix.
Comment #9
rszrama CreditAttribution: rszrama commentedI'd never turn away a patch. ; )
It's been bugging me for longer than this issue was posted, just never had the opportunity / luck to track it down.
Comment #10
rszrama CreditAttribution: rszrama commentedI'm co-opting two other feature requests into this issue and retitling it to be more clear about the fix.
Comment #11
MVRider CreditAttribution: MVRider commentedI'm still seeing this issue. Has this been fixed or should I tackle it?
Comment #12
malovanets CreditAttribution: malovanets commentedHello guys.
Hopefully this patch would solve the issue.
Comment #13
malovanets CreditAttribution: malovanets commentedI edited my patch a little, just to match the coding standards
Comment #14
rszrama CreditAttribution: rszrama commentedI think you intended something different with this if statement:
As written, it's performing the same conditional check twice. Perhaps you meant to look for a last_name?
However, what happens if someone is using the name line format for the widget, saves the data - thereby populating the first / last names, and then attempts an update? Would it not cause the name line to be set to whatever the previous values of first / last name are? Or does this data here only include the data that specifically came from the widget?
Comment #15
malovanets CreditAttribution: malovanets commentedOh... really...
It has to look like this. Thank's.
It receives the data from widget before saving to the database and updates all the 3 fields (first_name, last_name, name_line) all the time, when the data is changed.
Comment #16
malovanets CreditAttribution: malovanets commentedComment #17
dwkitchen CreditAttribution: dwkitchen commentedIt is possible, although why someone would, to have both first/last name and name line enable so perhaps it should be
Comment #18
malovanets CreditAttribution: malovanets commentedThank's David
Comment #19
joshmillerComment #20
rszrama CreditAttribution: rszrama commentedI simplified the logic of the split from the full name to first / last name. We can manipulate array values by reference via foreach and play with the PHP array API a little to make it easier to extract that first name. Have a look! : )
Commit: http://drupalcode.org/project/addressfield.git/commitdiff/4e31534