2

I'm using ubercart and I want to retrieve Address information from logged in users before they access to order/checkout page.

If they already have performed a checkout, Ubercart stores the address info, and autofill the fields.

Well, I would like to grab this information before to access to the checkout panel to customize my shop pages.

thanks

aneuryzm
  • 63,052
  • 100
  • 273
  • 488

1 Answers1

0

http://api.ubercart.org/api/function/uc_get_addresses/2

Eric
  • 2,900
  • 2
  • 19
  • 20
  • thanks! however I cannot invoke it.. I've created mymodule_uc_get_addresses() but it is ignored. Should I invoke it from my module ? – aneuryzm Jul 09 '10 at 08:30
  • I've also tried to invoke the function by myself but the result is an empty Array: $current_address = uc_get_addresses($user->uid); – aneuryzm Jul 09 '10 at 08:40
  • sorry, I looked around a bit, and not sure what the problem could be... maybe output just $user->uid first and make sure that is populated :-) – Eric Jul 09 '10 at 08:55
  • I've solved with this: $current_address = _uc_addresses_db_get_address($user->uid); (I'm using uc_addresses module) – aneuryzm Jul 09 '10 at 09:16