[Skip to main content](#vessel-content)

#   different admin email per product

##

- **[Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")**
- [![Schrijfklasje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile") Topic Author
- [ Offline](/forum/user/6455-schrijfklasje)

Less More

- Posts: 48
- Thank you received: 1
-
-

14 years 7 months ago [\#46118](#46118) by [Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")  *[different admin email per product](/forum/4-how-to/46118-different-admin-email-per-product#46118 "hi, I see your customization feature of emails in the configuration. Hope you can help me with this:  Customers buy product &quot;x hours thesishelp from one of my teachers&quot;, I want an email sent to me AND the teacher after succesful order of the product. How can I make this happen, I receive email as admin/owner: yes. But how can I add an automatic notification email to the specific teacher? I guess I need to make a hidden extra field with the product: the emailaddress of the teacher. And then to include a PHP statement to fetch that email in the Configuration/emails/Order administrator notification. Would you be able to write some php for this?  Thank you, Damiaan")* was created by *[Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")*

hi,
I see your customization feature of emails in the configuration. Hope you can help me with this:

Customers buy product "x hours thesishelp from one of my teachers", I want an email sent to me AND the teacher after succesful order of the product. How can I make this happen, I receive email as admin/owner: yes. But how can I add an automatic notification email to the specific teacher?
I guess I need to make a hidden extra field with the product: the emailaddress of the teacher. And then to include a PHP statement to fetch that email in the Configuration/emails/Order administrator notification.
Would you be able to write some php for this?

Thank you,
Damiaan

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MTE4LWRpZmZlcmVudC1hZG1pbi1lbWFpbC1wZXItcHJvZHVjdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

14 years 7 months ago [\#46205](#46205) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: different admin email per product](/forum/4-how-to/46118-different-admin-email-per-product#46205 "hi, I see your customization feature of emails in the configuration. Hope you can help me with this:  Customers buy product &quot;x hours thesishelp from one of my teachers&quot;, I want an email sent to me AND the teacher after succesful order of the product. How can I make this happen, I receive email as admin/owner: yes. But how can I add an automatic notification email to the specific teacher? I guess I need to make a hidden extra field with the product: the emailaddress of the teacher. And then to include a PHP statement to fetch that email in the Configuration/emails/Order administrator notification. Would you be able to write some php for this?  Thank you, Damiaan")*

Hi,

There is a thread here [ www.hikashop.com/en/forum/4-how-to/23622...multiple-people.html](http://www.hikashop.com/en/forum/4-how-to/23622-send-order-status-notification-to-multiple-people.html) about sending the order status notification to several people.

so you could do something similar. But instead of adding the emails manually, you would add them dynamically based on the custom field of the product:
$class = hikashop_get('class.product');
$prod = $class-&gt;get($item-&gt;product_id);
$data-&gt;customer-&gt;user_email[]=$prod-&gt;contact_email;

with contact_email being the column name of your custom field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MTE4LWRpZmZlcmVudC1hZG1pbi1lbWFpbC1wZXItcHJvZHVjdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")**
- [![Schrijfklasje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile") Topic Author
- [ Offline](/forum/user/6455-schrijfklasje)

Less More

- Posts: 48
- Thank you received: 1
-
-

14 years 7 months ago [\#46258](#46258) by [Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")  Replied by *[Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")* on topic *[Re: different admin email per product](/forum/4-how-to/46118-different-admin-email-per-product#46258 "hi, I see your customization feature of emails in the configuration. Hope you can help me with this:  Customers buy product &quot;x hours thesishelp from one of my teachers&quot;, I want an email sent to me AND the teacher after succesful order of the product. How can I make this happen, I receive email as admin/owner: yes. But how can I add an automatic notification email to the specific teacher? I guess I need to make a hidden extra field with the product: the emailaddress of the teacher. And then to include a PHP statement to fetch that email in the Configuration/emails/Order administrator notification. Would you be able to write some php for this?  Thank you, Damiaan")*

hi Nicolas,
sounds like a brilliant solution, will try it out the next days, thank you!
Damiaan

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MTE4LWRpZmZlcmVudC1hZG1pbi1lbWFpbC1wZXItcHJvZHVjdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")**
- [![Schrijfklasje's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile") Topic Author
- [ Offline](/forum/user/6455-schrijfklasje)

Less More

- Posts: 48
- Thank you received: 1
-
-

14 years 2 weeks ago [\#76355](#76355) by [Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")  Replied by *[Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")* on topic *[Re: different admin email per product](/forum/4-how-to/46118-different-admin-email-per-product#76355 "hi, I see your customization feature of emails in the configuration. Hope you can help me with this:  Customers buy product &quot;x hours thesishelp from one of my teachers&quot;, I want an email sent to me AND the teacher after succesful order of the product. How can I make this happen, I receive email as admin/owner: yes. But how can I add an automatic notification email to the specific teacher? I guess I need to make a hidden extra field with the product: the emailaddress of the teacher. And then to include a PHP statement to fetch that email in the Configuration/emails/Order administrator notification. Would you be able to write some php for this?  Thank you, Damiaan")*

hi, how do I combine the two advices in this thread?

//this is to send multiple emails//
&lt;?php $data-&gt;customer-&gt;user_email = array($data-&gt;customer-&gt;user_email,'email2@mywebsite.com','email3@mywebsite.com'); ?&gt;

//this to do that dynamically based on a custom field at the product page (different email per product)
$class = hikashop_get('class.product');
$prod = $class-&gt;get($item-&gt;product_id);
$data-&gt;customer-&gt;user_email[]=$prod-&gt;contact_email;

I tried putting the second in the array() - but that got me into troubles, thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MTE4LWRpZmZlcmVudC1hZG1pbi1lbWFpbC1wZXItcHJvZHVjdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

14 years 2 weeks ago [\#76554](#76554) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[different admin email per product](/forum/4-how-to/46118-different-admin-email-per-product#76554 "hi, I see your customization feature of emails in the configuration. Hope you can help me with this:  Customers buy product &quot;x hours thesishelp from one of my teachers&quot;, I want an email sent to me AND the teacher after succesful order of the product. How can I make this happen, I receive email as admin/owner: yes. But how can I add an automatic notification email to the specific teacher? I guess I need to make a hidden extra field with the product: the emailaddress of the teacher. And then to include a PHP statement to fetch that email in the Configuration/emails/Order administrator notification. Would you be able to write some php for this?  Thank you, Damiaan")*

Hi,

I don't know what you tried but, Code:

$data-&gt;customer-&gt;user_email = array($data-&gt;customer-&gt;user_email,'email2@mywebsite.com','email3@mywebsite.com');

would create an array for the variable "user_email" and Code:

$data-&gt;customer-&gt;user_email[] = $prod-&gt;contact_email;

add a new item (a new email) in this array (if the object "$prod" is loaded correctly).

What are your troubles ?

Regards,

---

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

The following user(s) said Thank You: [Schrijfklasje](/forum/user/6455-schrijfklasje "View Schrijfklasje's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ2MTE4LWRpZmZlcmVudC1hZG1pbi1lbWFpbC1wZXItcHJvZHVjdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.074 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
