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

#   Email "admin notification" depending on category

##

- **[stattgarde](/forum/user/3836-stattgarde "View stattgarde's Profile")**
- [![stattgarde's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar3836.png)](/forum/user/3836-stattgarde "View stattgarde's Profile") Topic Author
- [ Offline](/forum/user/3836-stattgarde)

Less More

- Posts: 13
- Thank you received: 0
-
- [](http://www.stattgarde.de)
-

15 years 5 days ago [\#28439](#28439) by [stattgarde](/forum/user/3836-stattgarde "View stattgarde's Profile")  *[Email "admin notification" depending on category](/forum/4-how-to/28439-email-admin-notification-depending-on-category#28439 "Hi!  Is it possible to send the admin notification on order creation to different email addresses depending on the categories the products of that order are in? Or maybe any other filter I could use to achieve something like that?  Kind regards, Simon")* was created by *[stattgarde](/forum/user/3836-stattgarde "View stattgarde's Profile")*

Hi!

Is it possible to send the admin notification on order creation to different email addresses depending on the categories the products of that order are in?
Or maybe any other filter I could use to achieve something like that?

Kind regards,
Simon

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI4NDM5LWVtYWlsLWFkbWluLW5vdGlmaWNhdGlvbi1kZXBlbmRpbmctb24tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 5 days ago [\#28462](#28462) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Email "admin notification" depending on category](/forum/4-how-to/28439-email-admin-notification-depending-on-category#28462 "Hi!  Is it possible to send the admin notification on order creation to different email addresses depending on the categories the products of that order are in? Or maybe any other filter I could use to achieve something like that?  Kind regards, Simon")*

Hi,

There is no option for that but it would be possible with some code customization of the email. If you know PHP, you can do that via the menu System-&gt;Emails in the Business edition.
You will have to first load the categories of the products in the order and then based on the categories, you can set the emails to which you want to send the email in the variable:
$data-&gt;customer-&gt;user_email = array('mail@company.com','mail2@company2.com');

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

- **[stattgarde](/forum/user/3836-stattgarde "View stattgarde's Profile")**
- [![stattgarde's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar3836.png)](/forum/user/3836-stattgarde "View stattgarde's Profile") Topic Author
- [ Offline](/forum/user/3836-stattgarde)

Less More

- Posts: 13
- Thank you received: 0
-
- [](http://www.stattgarde.de)
-

15 years 5 days ago [\#28473](#28473) by [stattgarde](/forum/user/3836-stattgarde "View stattgarde's Profile")  Replied by *[stattgarde](/forum/user/3836-stattgarde "View stattgarde's Profile")* on topic *[Re: Email "admin notification" depending on category](/forum/4-how-to/28439-email-admin-notification-depending-on-category#28473 "Hi!  Is it possible to send the admin notification on order creation to different email addresses depending on the categories the products of that order are in? Or maybe any other filter I could use to achieve something like that?  Kind regards, Simon")*

Thanks, that did the job.
For others to follow:
First I loaded the product class, then I iterated through the products in the order and loaded the category ids.
In these category ids I then searched for the desired id and if found I added a second email address. Code:

$productClass = hikashop::get('class.product'); foreach ($data-&gt;cart-&gt;products as $product) { $categories = $productClass-&gt;getCategories($product-&gt;product_id); if (is_array($categories) &amp;&amp; in_array($wantedCategoryId, $categories) { $data-&gt;customer-&gt;user_email[] = $secondaryEmail; break; } }

Kind regards, Simon

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI4NDM5LWVtYWlsLWFkbWluLW5vdGlmaWNhdGlvbi1kZXBlbmRpbmctb24tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) 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.070 seconds

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

[](#top)
