Copy profile info when a new order is created

Project:Ubercart Contributions
Component:Code
Category:
Priority:normal
Assigned:Unassigned
Status:patch (needs review)
Description
Project: 
Ubercart

Warning: the names of the profile fields are hard-coded, if anyone knows a good fix for this let me know and i'll change it. Both billing and shipping is filled in.

  • profile_first_name
  • profile_last_name
  • profile_company
  • profile_vat
  • profile_street1
  • profile_street2
  • profile_city
  • profile_postal_code
  • profile_country
  • profile_phone
PreviewAttachmentSize
ubercart_copyprofileinfo.patch_.txt1.73 KB
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Copy profile info when a new order is created

Hmm... one thought I've had is to allow customers to specify a default address from previous orders. (If they only have 1 order on record, that would be the address used.) Then you wouldn't have to worry about storing addresses in the profile... just load up the default address for that customer. I'll post up the details if I get to it.

attiks@drupal.org's picture
Offline
Joined: 10/08/2007
Juice: 16
Ryan, Is also a possibily,
Assigned to:Ryan» attiks@drupal.org

Ryan,

Is also a possibily, but my needs are a bit different, this is a site only accessible to registered users and users can not sign up them self, they have to sign a contract first. The admin then creates a new user with all his details and after they login they can order stuff.

I guess we need some kind of flexible system so site admins can choose which method they want to use:
- use profile information
- use the last used address as you suggest

aparker's picture
Offline
Joined: 10/31/2008
Juice: 30
A thought....
Assigned to:attiks@drupal.org» aparker

Ryan,
The profile address should really be the contract address for the user - not the default shipping address or billing address.

For example, our customers are all businesses. Their contact information might be an office, there shipping address is a warehousse, and their billing address for their credit card might be there house or a coporate office.

While this might make things a little more complex, it would be best to have them fill out a profile. Then have a check box if this is also their shipping address and another checkbox for billing address. If they check the boxes fill the form out for them. If they don't check the boxes, let them fill the form our manually.

Then store the profile information in the user profile, create a new table for default billing and ship to addresses. You could even keep multiple shipping/billing addresses on file and let them pick from a drop down.

This would give all of us the most flexibility.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: A thought....
Assigned to:aparker» Ryan

Have you looked at http://drupal.org/project/uc_addresses? These threads are all quite old/stale...

aparker's picture
Offline
Joined: 10/31/2008
Juice: 30
Ryan, I just downloaded and
Assigned to:Ryan» aparker

Ryan,
I just downloaded and yes - this completely solves the problem. Thanks,
Andy