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

#   Secondary Order Admin Notification email based on usergroup

##

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

Less More

- Posts: 12
- Thank you received: 0
-
-

9 years 1 month ago -  9 years 1 month ago [\#278737](#278737) by [insightdesign](/forum/user/51442-insightdesign "View insightdesign's Profile")  *[Secondary Order Admin Notification email based on usergroup](/forum/25-install-update/892013-secondary-order-admin-notification-email-based-on-usergroup#278737 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.7.4 -- PHP version -- : 7.1 -- Browser(s) name and version -- : All  I am needing to have a secondary email (a different order notification) sent to the Admin based on the customers usergroup.  -&gt; Customer Places Order -&gt; Admin receives standard &quot;Order administrator notification &quot; -&gt; If Usergroup 16, Admin receives secondary customized &quot;Order administrator notification &quot;  I've seen similar post like the one below, but they don't describe the fix for the issue described.  Also, they don't describe how to add an entirely new email to the list (there is no add button).  -Thanks    www.hikashop.com/support/forum/checkout/...d-on-user-group.html  I am using the business edition if that matters.")* was created by *[insightdesign](/forum/user/51442-insightdesign "View insightdesign's Profile")*

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.7.4
-- PHP version -- : 7.1
-- Browser(s) name and version -- : All

I am needing to have a secondary email (a different order notification) sent to the Admin based on the customers usergroup.

-&gt; Customer Places Order
-&gt; Admin receives standard "Order administrator notification "
-&gt; If Usergroup 16, Admin receives secondary customized "Order administrator notification "

I've seen similar post like the one below, but they don't describe the fix for the issue described.

Also, they don't describe how to add an entirely new email to the list (there is no add button).

-Thanks

[ www.hikashop.com/support/forum/checkout/...d-on-user-group.html](https://www.hikashop.com/support/forum/checkout/873443-custom-email-based-on-user-group.html)

I am using the business edition if that matters.

Last edit: 9 years 1 month ago by [insightdesign](/forum/user/51442-insightdesign "View insightdesign's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzg5MjAxMy1zZWNvbmRhcnktb3JkZXItYWRtaW4tbm90aWZpY2F0aW9uLWVtYWlsLWJhc2VkLW9uLXVzZXJncm91cD90bXBsPW1hcmtkb3du) 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: 86541
- Thank you received: 14304
-
-

9 years 1 month ago [\#278755](#278755) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Secondary Order Admin Notification email based on usergroup](/forum/25-install-update/892013-secondary-order-admin-notification-email-based-on-usergroup#278755 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.7.4 -- PHP version -- : 7.1 -- Browser(s) name and version -- : All  I am needing to have a secondary email (a different order notification) sent to the Admin based on the customers usergroup.  -&gt; Customer Places Order -&gt; Admin receives standard &quot;Order administrator notification &quot; -&gt; If Usergroup 16, Admin receives secondary customized &quot;Order administrator notification &quot;  I've seen similar post like the one below, but they don't describe the fix for the issue described.  Also, they don't describe how to add an entirely new email to the list (there is no add button).  -Thanks    www.hikashop.com/support/forum/checkout/...d-on-user-group.html  I am using the business edition if that matters.")*

Hi,

The post on the thread [ www.hikashop.com/support/forum/checkout/...er-group.html#182189](https://www.hikashop.com/support/forum/checkout/873443-custom-email-based-on-user-group.html#182189) looks good. Did you try the modification ?
What happened ? Did you get any error ?

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

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

Less More

- Posts: 12
- Thank you received: 0
-
-

9 years 1 month ago [\#278804](#278804) by [insightdesign](/forum/user/51442-insightdesign "View insightdesign's Profile")  Replied by *[insightdesign](/forum/user/51442-insightdesign "View insightdesign's Profile")* on topic *[Secondary Order Admin Notification email based on usergroup](/forum/25-install-update/892013-secondary-order-admin-notification-email-based-on-usergroup#278804 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.7.4 -- PHP version -- : 7.1 -- Browser(s) name and version -- : All  I am needing to have a secondary email (a different order notification) sent to the Admin based on the customers usergroup.  -&gt; Customer Places Order -&gt; Admin receives standard &quot;Order administrator notification &quot; -&gt; If Usergroup 16, Admin receives secondary customized &quot;Order administrator notification &quot;  I've seen similar post like the one below, but they don't describe the fix for the issue described.  Also, they don't describe how to add an entirely new email to the list (there is no add button).  -Thanks    www.hikashop.com/support/forum/checkout/...d-on-user-group.html  I am using the business edition if that matters.")*

> nicolas wrote: Hi,
>
> The post on the thread [ www.hikashop.com/support/forum/checkout/...er-group.html#182189](https://www.hikashop.com/support/forum/checkout/873443-custom-email-based-on-user-group.html#182189) looks good. Did you try the modification ?
> What happened ? Did you get any error ?

Hello,
Yes, I tried putting that code into the Admin Notification email, but now It is ONLY going to that specified address, and the admins are not getting the email as they were before. Do I need to replace the "user_email" with "admin_email"?

Also, concerning the second part of my question, how do I create a NEW email? There is a list of 15 emails, but no apparent way to add a new notification.
-Thanks
Code:

&lt;?php $userGroups = JAccess::getGroupsByUser($data-&gt;customer-&gt;user_cms_id); if(in_array(10,$userGroups)){ $data-&gt;customer-&gt;user_email .= ',manage@companya.com'; //for users in the user group with the id 10 }elseif(in_array(12,$userGroups)){ $data-&gt;customer-&gt;user_email .= ',manage@companyc.com'; //for users in the user group with the id 12 } ?&gt;

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

9 years 3 weeks ago [\#280728](#280728) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Secondary Order Admin Notification email based on usergroup](/forum/25-install-update/892013-secondary-order-admin-notification-email-based-on-usergroup#280728 "-- HikaShop version -- : 3.2.0 -- Joomla version -- : 3.7.4 -- PHP version -- : 7.1 -- Browser(s) name and version -- : All  I am needing to have a secondary email (a different order notification) sent to the Admin based on the customers usergroup.  -&gt; Customer Places Order -&gt; Admin receives standard &quot;Order administrator notification &quot; -&gt; If Usergroup 16, Admin receives secondary customized &quot;Order administrator notification &quot;  I've seen similar post like the one below, but they don't describe the fix for the issue described.  Also, they don't describe how to add an entirely new email to the list (there is no add button).  -Thanks    www.hikashop.com/support/forum/checkout/...d-on-user-group.html  I am using the business edition if that matters.")*

Hello and sorry for the late reply,

> Yes, I tried putting that code into the Admin Notification email, but now It is ONLY going to that specified address, and the admins are not getting the email as they were before. Do I need to replace the "user\_email" with "admin\_email"?

In that case, can you try it with that kind of code : Code:

&lt;?php $userGroups = JAccess::getGroupsByUser($data-&gt;customer-&gt;user_cms_id); if(in_array(10,$userGroups)){ $mail-&gt;cc_email = 'manage@companya.com'; //for users in the user group with the id 10 }elseif(in_array(12,$userGroups)){ $mail-&gt;cc_email = 'manage@companyc.com'; //for users in the user group with the id 12 } ?&gt;

> Also, concerning the second part of my question, how do I create a NEW email? There is a list of 15 emails, but no apparent way to add a new notification.

There is actually no option to create a new email for the moment, so the solution will directly be to create that email using code customization.

Best regards,
Mohamed Thelji.

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

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