- Posts: 25
- Thank you received: 0
How to include customer's email address on invoice
How can I include the customer's e-mail address on the invoice?
Probably very simple but I cannot figure it out.
regards,
Tom
Please Log in or Create an account to join the conversation.
You need to edit the file "invoice" via the menu Display->Views and add the line:
<?php echo $this->element->customer->user_email; ?>
Please Log in or Create an account to join the conversation.
this will add the mail address to the invoice at the back-end, but I need to add it to the invoice that is e-mailed to the customer.
I hope you can help.
regards,Tom
Please Log in or Create an account to join the conversation.
For that, you can edit the order status/creation notification emails via the menu System->Emails (Business edition only) and add something like that:
<?php echo $data->customer->user_email; ?>
Please Log in or Create an account to join the conversation.
Almost there....
I have added it to order_creation_notification.html.php and it works perfectly, but when I also add it to the order_admin_notification.html.php, It displays "Array" in the e-mail instead of the e-mail address.
Do I have to add something else than: <?php echo $data->customer->user_email; ?> for the admin order notification email?
regards,
Tom
Please Log in or Create an account to join the conversation.
That's why you need another code:
<?php
$userClass = hiakshop_get('class.user');
$user = $userClass->get($data->order_user_id);
echo $user->user_email; ?>
I understand that you modified the email files directly. Please note that, unlike when you edit the emails via the interface, you will loose your changes when you update as new versions of these will replace them.
Please Log in or Create an account to join the conversation.
regards,
Tom
Please Log in or Create an account to join the conversation.
That's maybe why.
Please Log in or Create an account to join the conversation.
I still get the same white screen with the invoice.
regards,Tom
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Does someone else know how I can do this very simple thing?
I like to add the customer's email address to the Order creation notification e-mail.
Please Log in or Create an account to join the conversation.
Also, you could try to increase the error reporting option of the joomla configuration and try to send the email again, that might display the error message instead of the white screen and that would help us tell you what to do.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You wrote hikakshop_get instead of hikashop_get
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
<?php
$userClass = hikashop_get('class.user');
$userClass->get(false);
$user = $userClass->get($data->order_user_id);
echo $user->user_email;
?>
Please Log in or Create an account to join the conversation.
Best regards,
Tom
Please Log in or Create an account to join the conversation.
- Posts: 32
- Thank you received: 0
Exactly what I was need!
Can you help also with code for "selected payment method"?
Please Log in or Create an account to join the conversation.
www.hikashop.com/en/support/forum/4-how-...firmation-email.html
Please Log in or Create an account to join the conversation.
Which do I edit for the customer's receipt of purchase.
Please Log in or Create an account to join the conversation.