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

#   Tailoring the Order creation notifications emails

##

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

Less More

- Posts: 217
- Thank you received: 1
-
-

13 years 6 months ago [\#98123](#98123) by [Mat](/forum/user/4216-mat "View Mat's Profile")  *[Tailoring the Order creation notifications emails](/forum/2-general-talk-about-hikashop/80142-tailoring-the-order-creation-notifications-emails#98123 "hi all,  Depending on the product bought I want the Order creation notifications email address sent to different people.  How might I go about that?  Thanks,  Mat")* was created by *[Mat](/forum/user/4216-mat "View Mat's Profile")*

hi all,

Depending on the product bought I want the Order creation notifications email address sent to different people.

How might I go about that?

Thanks,

Mat

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgwMTQyLXRhaWxvcmluZy10aGUtb3JkZXItY3JlYXRpb24tbm90aWZpY2F0aW9ucy1lbWFpbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 6 months ago [\#98201](#98201) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Tailoring the Order creation notifications emails](/forum/2-general-talk-about-hikashop/80142-tailoring-the-order-creation-notifications-emails#98201 "hi all,  Depending on the product bought I want the Order creation notifications email address sent to different people.  How might I go about that?  Thanks,  Mat")*

Hi,

You can edit the mail in question, and at the end of this mail check the products in the cart, and if product x send to y, if product a send to b, etc.
To add the addresses, you can use: $data-&gt;mail-&gt;dst_email .= ',' . 'email@toadd.com';

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgwMTQyLXRhaWxvcmluZy10aGUtb3JkZXItY3JlYXRpb24tbm90aWZpY2F0aW9ucy1lbWFpbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[djmelville](/forum/user/16551-djmelville "View djmelville's Profile")**
- [![djmelville's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-05-01.jpg)](/forum/user/16551-djmelville "View djmelville's Profile")
- [ Offline](/forum/user/16551-djmelville)

Less More

- Posts: 10
- Thank you received: 0
-
-
-
-

13 years 6 months ago [\#101769](#101769) by [djmelville](/forum/user/16551-djmelville "View djmelville's Profile")  Replied by *[djmelville](/forum/user/16551-djmelville "View djmelville's Profile")* on topic *[Tailoring the Order creation notifications emails](/forum/2-general-talk-about-hikashop/80142-tailoring-the-order-creation-notifications-emails#101769 "hi all,  Depending on the product bought I want the Order creation notifications email address sent to different people.  How might I go about that?  Thanks,  Mat")*

I was searching the Forum with the very same question, and found this topic.

Xavier, I have two questions for you:

1) Could you elaborate a bit more on your response? By that I mean, could you give us a better example of what you mean by "check the products in the cart"? I am quite proficient in PHP, but without the in-depth knowledge of the internals of HikaShop, it is quite difficult to understand what you mean by the specifically.

2) Wouldn't it be much simpler (and easier) to add this functionality as an enhancement to the configuration? This could be a simple as adding a "Order Notification Email Address" column to Brand, Category, and Product, which would allow such configuration to be as granular as is necessary, and during the course of the email generation to load an array of email recipients, and then eliminate the duplicates before finally addressing the email.

Question 2 is really more of an enhancement request. What Mat and I are suggesting is really quite a common occurrence, and adding the functionality I described would make for a great enhancement to your product.

Thanks and Regards,
David

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgwMTQyLXRhaWxvcmluZy10aGUtb3JkZXItY3JlYXRpb24tbm90aWZpY2F0aW9ucy1lbWFpbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86321
- Thank you received: 14279
-
-

13 years 6 months ago [\#101782](#101782) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Tailoring the Order creation notifications emails](/forum/2-general-talk-about-hikashop/80142-tailoring-the-order-creation-notifications-emails#101782 "hi all,  Depending on the product bought I want the Order creation notifications email address sent to different people.  How might I go about that?  Thanks,  Mat")*

You can already do that with HikaMarket Multivendor.
With it, you can assign each product to a vendor and the vendor will be notified when a purchase of his products is made.
It's even better that the solution provided by Xavier because the vendor will only see his own products in the email notification. And using that feature, you don't need to edit any code.

Regarding the code, if you're already a developer, you should find quite rapidely how to loop through the products in the order for the check of who should receive a copy of the email by looking at the code already in the email.
Here is a simplified example : Code:

foreach($data-&gt;cart-&gt;products as $item){ if($item-&gt;order_product_code=='my_prod'){ $data-&gt;mail-&gt;dst_email .= ',' . ' email@toadd.com'; } }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgwMTQyLXRhaWxvcmluZy10aGUtb3JkZXItY3JlYXRpb24tbm90aWZpY2F0aW9ucy1lbWFpbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.068 seconds

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

[](#top)
