Skip to main content

read out a user's company name in onBeforeDownload

14 years 1 month ago #66237 by klimmbimm
In my PDFBranding Plugin I need to access a user's company name (if given).
How would I do that?

Please Log in or Create an account to join the conversation.

14 years 1 month ago #66443 by nicolas
You can get the current user id like that:
$user_id = hikashop_loadUser();

Then you need to load the addresses of the user like that:
$class = hikashop_get('class.address');
$addresses = $class->getByUser($user_id);

Then, the first address:
$address = reset($addresses);

Then the company name:
echo $address->address_company;
The following user(s) said Thank You: klimmbimm

Please Log in or Create an account to join the conversation.

14 years 1 month ago #66862 by klimmbimm
works perfectly! thank you very much!

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum