If a custom module defines their own customer profile type or extends another choosing to not use the default 'base' in the profile definition then the address book will not show up for those profile panes. The issue is in commerce_addressbook.module 's hook_form_alter. To determine if the checkout pane is a customer profile it compares the 'base' parameter, but this limits the address book to working for only customer profile panes that use the default that comes with commerce.
I will provide a patch that will allow it to work with all customer profile types. We'll do a comparison on the pane_id which in the case of customer profiles always starts with 'customer_profile' as its a part of the machine name and always consistent.
cheers!
Comment | File | Size | Author |
---|---|---|---|
#1 | commerce_addressbook_use_pane_id_in_form_alter_1882390_0.patch | 2.08 KB | acrazyanimal |
Comments
Comment #1
acrazyanimal CreditAttribution: acrazyanimal commentedThe patch is git aware. :)
Comment #2
acrazyanimal CreditAttribution: acrazyanimal commentedAnyone have the time to look at this, review, mark as RTBC????
Comment #3
David Stosik CreditAttribution: David Stosik commentedJust had this problem myself, and the patch fixed it perfectly!
Thank you,
David
Comment #4
drupalerocant CreditAttribution: drupalerocant commentedI just had the same problem with a custom profile and the patch solved it for me.
Thank you very much!
Comment #5
sportel CreditAttribution: sportel commentedAfter I installed the 'Customer Profile Type UI'-module, the "Enable the Address book" setting disappeared. Your patch solved the problem.
Thanks,
Mike.
Comment #6
jsacksick CreditAttribution: jsacksick commentedCommitted to dev, thanks http://drupalcode.org/project/commerce_addressbook.git/commit/c81c7a7