- Posts: 137
- Thank you received: 2
Address Class
- emergentec
-
Topic Author
- Offline
Less
More
14 years 6 months ago #41361
by emergentec
Address Class was created by emergentec
Hi,
when i am generating the emails for the user status notification, i am trying to retrieve the address so as to include it in the email. So i do the following:
$addressClass = hikashop_get('class.address');
$address = $addressClass->get($dbOrder->order_user_id); //and i know the user_id at this point
and the i am trying to access the address table with:
$address->address_firstname;
but this returns an empty address with no error created.
Could you please suggest an approach that could work.
Thank you in advance.
when i am generating the emails for the user status notification, i am trying to retrieve the address so as to include it in the email. So i do the following:
$addressClass = hikashop_get('class.address');
$address = $addressClass->get($dbOrder->order_user_id); //and i know the user_id at this point
and the i am trying to access the address table with:
$address->address_firstname;
but this returns an empty address with no error created.
Could you please suggest an approach that could work.
Thank you in advance.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #41544
by nicolas
Replied by nicolas on topic Re: Address Class
Hi,
$dbOrder->order_user_id is the id of the user, not the id of the address.
For the address, you should use that:
$dbOrder->order_billing_address_id
so have your code like that:
$addressClass = hikashop_get('class.address');
$address = $addressClass->get($dbOrder->order_billing_address_id);
$dbOrder->order_user_id is the id of the user, not the id of the address.
For the address, you should use that:
$dbOrder->order_billing_address_id
so have your code like that:
$addressClass = hikashop_get('class.address');
$address = $addressClass->get($dbOrder->order_billing_address_id);
Please Log in or Create an account to join the conversation.
- emergentec
-
Topic Author
- Offline
Less
More
- Posts: 137
- Thank you received: 2
14 years 6 months ago #41657
by emergentec
Replied by emergentec on topic Re: Address Class
Thank you Nicolas,
your suggestion is very helpful.
Thanks again.
your suggestion is very helpful.
Thanks again.
Please Log in or Create an account to join the conversation.
Time to create page: 0.268 seconds