views:

18

answers:

1

hi,

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

A: 

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

Eric
thanks! however I cannot invoke it.. I've created mymodule_uc_get_addresses() but it is ignored. Should I invoke it from my module ?
Patrick
I've also tried to invoke the function by myself but the result is an empty Array: $current_address = uc_get_addresses($user->uid);
Patrick
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
I've solved with this: $current_address = _uc_addresses_db_get_address($user->uid); (I'm using uc_addresses module)
Patrick

related questions