1
Answers
Vote up!
0
Vote down!

Pull Address from Address Field into Customer Profile (Billing and Shipping)

I am using Address Field module and users enter their address at the time of registration. I want to pull address information into customer profiles (billing and shipping) so that when, users go to checkout, they could select same address from 'Addresses on File'.

I tried 'commerce_extra' module which shows address from users address filed but I am looking for way to add it even before users goes for checkout.

Can I use rules to do this? If yes, please give me details.

Thank you in advance

Asked by: zealny
on January 9, 2013

Comments

Hi Zealny,

I saw your post on the commerce module page on drupal.org, where you were redirected to this forum by rszrama. I also saw that according to him it is possible to get the job done with rules, but I don't see any explanation yet. Thats's a pity, because I'm looking for the same solution.
I did manage to get the billing information from anonymous users into the newly created user account, but the other way around is a problem. I hope you'll get an answer soon.

Mike.

- sportel on March 21, 2013

1 Answer

Vote up!
1
Vote down!

Hi,
First of all you need to add an addressfield on the useraccount of course. Then I used http://drupal.org/project/customer_profile_type_ui to create a new profile type (living address), and make sure you check "Include the default Addressfield". Then, I adapted the "Create a new account for an anonymous order" rule, and added an action to set a data value. With this you can set the value for the addressfield on the newly created user account with the value from the addressfield on the customer profile type (living address in my case).

Answer by: sportel
Posted: Apr 11, 2013

Comments

@sportel Can you copy paste the export of that Rule here? I'm missing something and I can't figure out what it is.

- S1L on April 12, 2013