How do we get user emails copied to admin?

  • Posts: 60
  • Thank you received: 1
11 years 11 months ago #81459

More specifically how do we get the order confirmation email the customer gets copied to Admin.

Hikashop sends the customer this email which contains all the information required to fulfil orders so it would be very useful to have a copy of it.

Cheers

Crispin

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
11 years 11 months ago #81465

Hi,

You can edit the email with HikaShop and place this code at the end of the email.
So just after this

<?php
$data->customer = $customer;
Add this:
$config =& hikashop_config();
$data->customer->user_email .= ',' . $config->get('payment_notification_email');
It would add the payment notification email in copy of the email.
Be careful, the email would be send to two address in the same email, so the customer would see that the email as been send to your "payment notification email" too.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: nikmackey

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

  • Posts: 60
  • Thank you received: 1
11 years 11 months ago #81618

Thanks. I'll give this a go and let you know how we get on.

Cheers

Crispin

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

  • Posts: 60
  • Thank you received: 1
11 years 11 months ago #81931

This is the resulting code in Order status notification

<?php $data->customer = $customer;
$config =& hikashop_config(); 
$data->customer->user_email .= 'orders@blakeworth.com,'. $config->get('payment_notification_email');?>

Unfortunately now no order notification emails go out.

What did we do wrong?

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
11 years 11 months ago #81933

Hi,

There is already a email in the $data->customer->user_email.
So by adding your email "This email address is being protected from spambots. You need JavaScript enabled to view it." without comma, it would break the previous email.

Use instead:

$data->customer->user_email .= ',orders@blakeworth.com';

Regards


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: nikmackey

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

  • Posts: 60
  • Thank you received: 1
11 years 11 months ago #82101

Got it.

Thanks

Crispin

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

  • Posts: 60
  • Thank you received: 1
11 years 11 months ago #82124

Am I being really stupid here?

This is the code we now have

<?php $data->customer = $customer;
$config =& hikashop_config(); 
$data->customer->user_email .= ',orders@blakeworth.com' . $config->get('payment_notification_email');?>

I note that in your version you now have a semi colon after
$data->customer->user_email .= ',orders@blakeworth.com';
where it wasn't in your original version

The customer is now receiving the confirmation but the copy isn't being received.

Crispin

Last edit: 11 years 11 months ago by nikmackey.

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
11 years 11 months ago #82127

Hi,

I gave you several solutions but you didn't use any of ones that I gave you.
You just have to copy past the entire line.

Solution one:

$data->customer->user_email .= ',' . $config->get('payment_notification_email');
Solution two:
$data->customer->user_email .= ',orders@blakeworth.com';

And if you really want to add TWO MORE emails.
$data->customer->user_email .= ',orders@blakeworth.com' . ',' . $config->get('payment_notification_email');?>

Please, do not improvise.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.044 seconds
Powered by Kunena Forum