- Posts: 24
- Thank you received: 0
Order email from field to show user's name and ema
12 years 1 day ago #174227
by ketsh
Order email from field to show user's name and ema was created by ketsh
-- url of the page with the problem -- :
teszt2.honlapkeszitespecs.hu/
-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.3.6
Hi!
Is there a chance to set the order email that goes to the administrator, to show the email and the name of the registered user?
Thanks!
-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.3.6
Hi!
Is there a chance to set the order email that goes to the administrator, to show the email and the name of the registered user?
Thanks!
Please Log in or Create an account to join the conversation.
12 years 1 day ago #174236
by Xavier
Replied by Xavier on topic Order email from field to show user's name and ema
Hi,
Yes you can edit it through the menu System > Emails and then edit the html part of the desired email.
In this part, you can add tags like:
But these informations should already be present in the emails by default.
Which email exactly you want to edit ?
Yes you can edit it through the menu System > Emails and then edit the html part of the desired email.
In this part, you can add tags like:
Code:
{VAR:CUSTOMER_DETAILS}
But these informations should already be present in the emails by default.
Which email exactly you want to edit ?
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174461
by ketsh
Replied by ketsh on topic Order email from field to show user's name and ema
Hi Xavier!
I would like to edit the one that goes to the administrator when an order comes in.
I think it is the Order administrator notification.
My problem, is, that in the html part I can set the body of the email. But I would like to set the from field of the email to the actual email an name of the customer placed the order.
I have attached a screenshot.
Thanks!
I would like to edit the one that goes to the administrator when an order comes in.
I think it is the Order administrator notification.
My problem, is, that in the html part I can set the body of the email. But I would like to set the from field of the email to the actual email an name of the customer placed the order.
I have attached a screenshot.
Thanks!
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174515
by Xavier
Replied by Xavier on topic Order email from field to show user's name and ema
Hi,
Ok so you want to simulate that the email is sent by the customer himself ?
You will have to add some php in the email. Something like:
Ok so you want to simulate that the email is sent by the customer himself ?
You will have to add some php in the email. Something like:
Code:
<?php
$userInfos = $userClass->get($data->order_user_id);
$mailer = JFactory::getMailer();
$mailer ->from_name = $userInfos->user_name;
$mailer ->from_email = $userInfos->user_email;
?>
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174677
by ketsh
Replied by ketsh on topic Order email from field to show user's name and ema
Hi Xavier!
Yes, that is what I would like to do. Where exactly do I have to include that php code? I have tried to place it in the Preload and in the HTML part, but without success.
Yes, that is what I would like to do. Where exactly do I have to include that php code? I have tried to place it in the Preload and in the HTML part, but without success.
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174894
by nicolas
Replied by nicolas on topic Order email from field to show user's name and ema
Hi,
I think that it will work better by adding such code at the end of the preload:
I think that it will work better by adding such code at the end of the preload:
Code:
<?php
$userInfos = $userClass->get($data->order_user_id);
$mail ->from_name = $userInfos->user_name;
$mail ->from_email = $userInfos->user_email;
?>
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174915
by ketsh
Replied by ketsh on topic Order email from field to show user's name and ema
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174921
by Xavier
Replied by Xavier on topic Order email from field to show user's name and ema
Hi,
Potentially because there is an error, there is a space between "$mail" and "->from_...".
Please remove this space.
Potentially because there is an error, there is a space between "$mail" and "->from_...".
Please remove this space.
Please Log in or Create an account to join the conversation.
11 years 11 months ago - 11 years 11 months ago #175081
by ketsh
Replied by ketsh on topic Order email from field to show user's name and ema
Hi!
Ok, I've got it!!
It was
$mail->from_name = $userInfos->name;
not
$mail->from_name = $userInfos->user_name;
It works now, thank you very much!
Ok, I've got it!!
It was
$mail->from_name = $userInfos->name;
not
$mail->from_name = $userInfos->user_name;
It works now, thank you very much!
Last edit: 11 years 11 months ago by ketsh.
Please Log in or Create an account to join the conversation.
11 years 11 months ago #175085
by Xavier
Replied by Xavier on topic Order email from field to show user's name and ema
Hi,
Could you try with that:
There was spaces too in the code given previously.
Could you try with that:
Code:
<?php
$userInfos = $userClass->get($data->order_user_id);
$mailer = JFactory::getMailer();
$mailer->from_name = $userInfos->user_name;
$mailer->from_email = $userInfos->user_email;
?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.243 seconds