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

#   Disabling emails

##

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#19676](#19676) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  *[Disabling emails](/forum/4-how-to/19676-disabling-emails#19676 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")* was created by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")*

Is it possible to disable the following emails from being sent to the customer:

Order creation notification
Order status notification

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5Njc2LWRpc2FibGluZy1lbWFpbHM/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: 86324
- Thank you received: 14286
-
-

15 years 4 months ago [\#19693](#19693) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#19693 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

Yes. You can edit the emails via the menu System-&gt;Emails. There, add the line:
$data-&gt;customer-&gt;user_email = '';
at the end of the code of the email and the email won't be sent.

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

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#19701](#19701) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#19701 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

Seems to have done it thanks - could a (un)publish tickbox be added to your wish list to make it more obvious please?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5Njc2LWRpc2FibGluZy1lbWFpbHM/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: 86324
- Thank you received: 14286
-
-

15 years 4 months ago [\#19707](#19707) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#19707 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

Yes, that's a good idea.

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

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#20100](#20100) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#20100 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

Whoops - unexpected side affect of setting *user\_email = ''*.

It gets inherited in other places where *$user =&amp; hikashop::loadUser(true);* is called.
E.G. *onAfterOrderConfirm()* routines of payment plug-ins.

Will have to live with the emails for now until there is a more robust solution.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5Njc2LWRpc2FibGluZy1lbWFpbHM/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: 86324
- Thank you received: 14286
-
-

15 years 4 months ago [\#20101](#20101) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#20101 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

We added a publish button while doing a new build of the 1.5.2 version. If you redownload it, you should be able to unpublish the emails.

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

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#20104](#20104) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#20104 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

Thanks.
I was just about to download 1.5.2 and will look at it this evening, not had time until now.

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

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#20120](#20120) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#20120 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

Not working as expected with this afternoon's download of 1.5.2.

Looking at the code in order.php class realised that *$send\_email* is a parameter to the *onAfterOrderUpdate* and *onAfterOrderCreate* triggers - doh!! overlooked that spending too much time concentrating on my code within the triggers and overlooked what's at the top. So that would be a place where it can be controlled with custom code.

In the order.php class I would expect to see something like this - in pseudo-code. Code:

$send_email = true if published else false; $dispatcher-&gt;trigger( 'onAfterOrderCreate', array( &amp; $order,&amp;$send_email) );

Code:

$send_email = true if published else false; if ($send_email) { $send_email = @$order-&gt;history-&gt;history_notified; } $dispatcher-&gt;trigger( 'onAfterOrderUpdate', array( &amp; $order,&amp;$send_email) );

So the new publish/unpublish feature sets the default behaviour which custom trigger code is free to overwrite if desired.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzE5Njc2LWRpc2FibGluZy1lbWFpbHM/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: 86324
- Thank you received: 14286
-
-

15 years 4 months ago [\#20130](#20130) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#20130 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

We forgot the line:
if(isset($mail-&gt;published) &amp;&amp; !$mail-&gt;published) return true;

after the lines:
function sendMail(&amp;$mail){
if(empty($mail)){
return false;
}

in the file administrator/components/com_hikashop/classes/mail.php

That's why the published state didn't change anything.

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

- **[brainforge](/forum/user/423-brainforge "View brainforge's Profile")**
- [![brainforge's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar423.jpg)](/forum/user/423-brainforge "View brainforge's Profile") Topic Author
- [ Offline](/forum/user/423-brainforge)

Less More

- Posts: 298
- Thank you received: 5
-
-
-
- [](https://brainforge.co.uk)
-

15 years 4 months ago [\#20161](#20161) by [brainforge](/forum/user/423-brainforge "View brainforge's Profile")  Replied by *[brainforge](/forum/user/423-brainforge "View brainforge's Profile")* on topic *[Re: Disabling emails](/forum/4-how-to/19676-disabling-emails#20161 "Is it possible to disable the following emails from being sent to the customer:  Order creation notification Order status notification")*

Fixes it, thanks.

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

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