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

#   Custom emails by Order Status

##

- **[PolishedGeek](/forum/user/8378-polishedgeek "View PolishedGeek's Profile")**
- [![PolishedGeek's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8378-polishedgeek "View PolishedGeek's Profile") Topic Author
- [ Offline](/forum/user/8378-polishedgeek)
- Official HikaShop Development Partner

Less More

- Posts: 329
- Thank you received: 94
-
- [](http://PolishedGeek.com/?utm_source=hikashop)
-

12 years 4 weeks ago [\#177168](#177168) by [PolishedGeek](/forum/user/8378-polishedgeek "View PolishedGeek's Profile")  *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177168 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")* was created by *[PolishedGeek](/forum/user/8378-polishedgeek "View PolishedGeek's Profile")*

-- HikaShop version -- : 2.x
-- Joomla version -- : 3.x

We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to "Partial Backorder" would be different content than the email when the status is changed to "Ready for Pickup", etc.

Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send_email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.

Or of course maybe our client will be lucky and you already have this type of feature in development? ![:)](/media/kunena/emoticons/3.png ":)")

---

~ Deb Cinkus, CEO

Polished Geek: more with monday․com
eCommerce Business Process Automation Experts

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg3MjYyNy1jdXN0b20tZW1haWxzLWJ5LW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) 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: 14325
-
-

12 years 4 weeks ago [\#177214](#177214) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177214 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

In each case when the status is changed, it's the "order status notification" email which is sent.
A simple solution is to just add some if/else conditions on the order status in the email template in order to display the email one way or the other based on the status: Code:

&lt;?php if($data-&gt;cart-&gt;order_status == 'Ready for Pickup'){ ?&gt; text for ready for pickup &lt;?php } ?&gt;

it should be easier to manage than with a plugin, but yes a plugin is also possible.

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 4 weeks ago [\#177398](#177398) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177398 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

I would love to have this feature too ...
Is there an easy way to do this ?
Where do you need to change the code ?

Thanks !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg3MjYyNy1jdXN0b20tZW1haWxzLWJ5LW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) 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: 14325
-
-

12 years 4 weeks ago [\#177421](#177421) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177421 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hi,

When you edit your email via the menu System&gt;Emails, you can add the code I gave (and adapt it to your situation) in the HTML version of the order status notification email.

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 4 weeks ago -  12 years 4 weeks ago [\#177515](#177515) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177515 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hi Nicolas,

many thanks for the tip, but i do not seem to able to get it working.

I've created a new status order called "Warning", it has ID 17 and is published.

I've put the php code in like you said (I probably did something wrong, but my php is not anymore what it used to be ..![:-)](/media/kunena/emoticons/3.png ":-)") )

Here's the code : can you tell me what I'm doing wrong ?
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.3.4 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;style type="text/css"&gt; body.hikashop_mail { background-color:#ffffff; color:#575757; } .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} div, p, a, li, td {-webkit-text-size-adjust:none;} @media (min-width:600px){ #hikashop_mail {width:600px !important;margin:auto !important;} .pict img {max-width:500px !important;height:auto !important;} } @media (max-width:330px){ #hikashop_mail{width:300px !important; margin:auto !important;} table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;} td[class="w49"] { width: 10px !important;} .pict img {max-width:278px; height:auto !important;} } @media (min-width:331px) and (max-width:480px){ #hikashop_mail{width:450px !important; margin:auto !important;} table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;} td[class="w49"] { width: 20px !important;} .pict img {max-width:408px; height:auto !important;} } h1{color:#1c8faf;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd; padding-bottom:10px;} h2{color:#89a9c1;font-size:14px;font-weight:bold;margin-top:20px;margin-bottom:5px;border-bottom:1px solid #d6d6d6;padding-bottom:4px;} a:visited{cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;} &lt;/style&gt; &lt;?php if($data-&gt;cart-&gt;order_status == 'created'){ ?&gt; &lt;div id="hikashop_mail" style="font-family:Arial, Helvetica,sans-serif;font-size:12px;line-height:18px;width:100%;background-color:#ffffff;padding-bottom:20px;color:#5b5b5b;"&gt; &lt;div class="hikashop_online" style="font-family:Arial, Helvetica,sans-serif;font-size:11px;line-height:18px;color:#6a5c6b;text-decoration:none;margin:10px;text-align:center;"&gt; &lt;a style="cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;" href="{VAR:URL}"&gt; &lt;span class="hikashop_online" style="color:#6a5c6b;text-decoration:none;font-size:11px;margin-top:10px;margin-bottom:10px;text-align:center;"&gt; {TXT:MAIL_HEADER} &lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;table class="w600" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin:auto;background-color:#ebebeb;" border="0" cellspacing="0" cellpadding="0" width="600" align="center"&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="bottom"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}media/com_hikashop/images/mail/header.png" border="0" alt="" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w600" style="" width="600" align="center"&gt; &lt;table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td class="w560 pict" style="text-align:left; color:#575757" width="560"&gt; &lt;div id="title" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;img src="{VAR:LIVE_SITE}/media/com_hikashop/images/icons/icon-48-order.png" border="0" alt="" style="float:left;margin-right:4px;"/&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold; border-bottom:1px solid #ddd; padding-bottom:10px"&gt; {TXT:ORDER_TITLE} &lt;/h1&gt; &lt;h2 style="color:#1c8faf !important;font-size:12px;font-weight:bold; padding-bottom:10px"&gt; {TXT:ORDER_CHANGED} &lt;/h2&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td style="border:1px solid #adadad;background-color:#ffffff;"&gt; &lt;div class="w550" width="550" id="content" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin-left:5px;margin-right:5px;"&gt; &lt;h3 style="color:#393939 !important; font-size:14px; font-weight:normal; font-weight:bold;margin-bottom:0px;padding:0px;"&gt;{TXT:HI_CUSTOMER}&lt;/h3&gt; &lt;p&gt; {TXT:ORDER_BEGIN_MESSAGE} &lt;br /&gt; Uw reservatie werd goed ontvangen. &lt;/p&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt;&lt;td style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:BILLING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt;&lt;!--{IF:SHIPPING_ADDRESS}--&gt;&lt;td style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:SHIPPING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt;&lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt;&lt;td&gt;{VAR:BILLING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt;&lt;!--{IF:SHIPPING_ADDRESS}--&gt;&lt;td&gt;{VAR:SHIPPING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt;&lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;/table&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:SUMMARY_OF_YOUR_ORDER} &lt;/h1&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;margin-bottom:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_NAME}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{START:PRODUCT_LINE}--&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;"&gt; {LINEVAR:PRODUCT_IMG} {LINEVAR:PRODUCT_NAME}&lt;!--{IF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_CODE}&lt;!--{ENDIF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_DOWNLOAD} &lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:PRODUCT_LINE}--&gt; &lt;!--{START:ORDER_FOOTER}--&gt; &lt;tr&gt; &lt;td colspan="3" style="text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{LINEVAR:NAME}&lt;/td&gt; &lt;td style="text-align:right"&gt;{LINEVAR:VALUE}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:ORDER_FOOTER}--&gt; &lt;/table&gt; &lt;!--{IF:PAYMENT}--&gt; &lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PAYMENT_METHOD} :&lt;/span&gt; {VAR:PAYMENT} &lt;/p&gt; &lt;!--{ENDIF:PAYMENT}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:HIKASHOP_SHIPPING_METHOD} :&lt;/span&gt; {VAR:SHIPPING} &lt;/p&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;!--{IF:ORDER_SUMMARY}--&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:ADDITIONAL_INFORMATION} &lt;/h1&gt; &lt;p style="border-bottom:1px solid #ddd;padding-bottom:10px;"&gt; {VAR:ORDER_SUMMARY} &lt;/p&gt; &lt;!--{ENDIF:ORDER_SUMMARY}--&gt; &lt;p&gt; {TXT:ORDER_END_MESSAGE} &lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="top"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}/media/com_hikashop/images/mail/footer.png" border="0" alt="--" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php } ?&gt; &lt;?php if($data-&gt;cart-&gt;order_status == 'Warning'){ ?&gt; &lt;div id="hikashop_mail" style="font-family:Arial, Helvetica,sans-serif;font-size:12px;line-height:18px;width:100%;background-color:#ffffff;padding-bottom:20px;color:#5b5b5b;"&gt; &lt;div class="hikashop_online" style="font-family:Arial, Helvetica,sans-serif;font-size:11px;line-height:18px;color:#6a5c6b;text-decoration:none;margin:10px;text-align:center;"&gt; &lt;a style="cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;" href="{VAR:URL}"&gt; &lt;span class="hikashop_online" style="color:#6a5c6b;text-decoration:none;font-size:11px;margin-top:10px;margin-bottom:10px;text-align:center;"&gt; {TXT:MAIL_HEADER} &lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;table class="w600" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin:auto;background-color:#ebebeb;" border="0" cellspacing="0" cellpadding="0" width="600" align="center"&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="bottom"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}media/com_hikashop/images/mail/header.png" border="0" alt="" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w600" style="" width="600" align="center"&gt; &lt;table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td class="w560 pict" style="text-align:left; color:#575757" width="560"&gt; &lt;div id="title" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;img src="{VAR:LIVE_SITE}/media/com_hikashop/images/icons/icon-48-order.png" border="0" alt="" style="float:left;margin-right:4px;"/&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold; border-bottom:1px solid #ddd; padding-bottom:10px"&gt; {TXT:ORDER_TITLE} &lt;/h1&gt; &lt;h2 style="color:#1c8faf !important;font-size:12px;font-weight:bold; padding-bottom:10px"&gt; {TXT:ORDER_CHANGED} &lt;/h2&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td style="border:1px solid #adadad;background-color:#ffffff;"&gt; &lt;div class="w550" width="550" id="content" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin-left:5px;margin-right:5px;"&gt; &lt;h3 style="color:#393939 !important; font-size:14px; font-weight:normal; font-weight:bold;margin-bottom:0px;padding:0px;"&gt;{TXT:HI_CUSTOMER}&lt;/h3&gt; &lt;p&gt;Beste, &lt;br /&gt;Wij mochten nog geen betaling ontvangen voor uw reservatie. &lt;br /&gt;Gelieve dit binnen de 3 werkdagen in orde te brengen, anders zijn wij genoodzaakt uw reservatie zonder verdere waarschuwing te annuleren.&lt;br /&gt;Mocht uw betaling deze herinnnering gekruisd hebben, mag u deze natuurlijk gewoon negeren. &lt;/p&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:SUMMARY_OF_YOUR_ORDER} &lt;/h1&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;margin-bottom:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_NAME}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{START:PRODUCT_LINE}--&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;"&gt; {LINEVAR:PRODUCT_IMG} {LINEVAR:PRODUCT_NAME}&lt;!--{IF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_CODE}&lt;!--{ENDIF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_DOWNLOAD} &lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:PRODUCT_LINE}--&gt; &lt;!--{START:ORDER_FOOTER}--&gt; &lt;tr&gt; &lt;td colspan="3" style="text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{LINEVAR:NAME}&lt;/td&gt; &lt;td style="text-align:right"&gt;{LINEVAR:VALUE}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:ORDER_FOOTER}--&gt; &lt;/table&gt; &lt;!--{IF:PAYMENT}--&gt; &lt;!--&lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PAYMENT_METHOD} :&lt;/span&gt; {VAR:PAYMENT} &lt;/p&gt; --&gt; &lt;!--{ENDIF:PAYMENT}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:HIKASHOP_SHIPPING_METHOD} :&lt;/span&gt; {VAR:SHIPPING} &lt;/p&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;!--{IF:ORDER_SUMMARY}--&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:ADDITIONAL_INFORMATION} &lt;/h1&gt; &lt;p style="border-bottom:1px solid #ddd;padding-bottom:10px;"&gt; {VAR:ORDER_SUMMARY} &lt;/p&gt; &lt;!--{ENDIF:ORDER_SUMMARY}--&gt; &lt;p&gt; {TXT:ORDER_END_MESSAGE} &lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="top"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}/media/com_hikashop/images/mail/footer.png" border="0" alt="--" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php } ?&gt;

As you cans ee, on line 199 I've put some new text, but this won't display in my emails ?

Many thanks for you help !

Joris

Last edit: 12 years 4 weeks ago by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile").

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

12 years 3 weeks ago [\#177530](#177530) 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 *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177530 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hello,
Can you give me more information about what do you exactly want to do ? because in your case you won't send any text if your order_status is different than Warning or Created.

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 3 weeks ago [\#177661](#177661) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177661 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

hey Mohamed,

Thanks for you reply.
I want to have a different standard email to my customer, depending on the status.
This was my first attempt at it, so I did not do it for all the statuses yet, but, I do not seem to be able to get the text I want in the email. It does send the change of the status in the email, but the text I wrote doesn't show.

Besides this, I would like to know if it possible to add custom comments to these emails, like VM has ?

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

12 years 3 weeks ago [\#177665](#177665) 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 *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#177665 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hello,

> This was my first attempt at it, so I did not do it for all the statuses yet, but, I do not seem to be able to get the text I want in the email.

Ok, but are you sure that your order status was set to Warning or Created ? Also did you correctly received the custom text (order_status == created) : Uw reservatie werd goed ontvangen.

> Besides this, I would like to know if it possible to add custom comments to these emails, like VM has ?

What do you exactly mean by custom comments ?

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 3 weeks ago [\#178532](#178532) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178532 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

hello,

1. Status was changed to Warning (I did receive the email, with the new status). But, the custom text was not in the mail.
2. See attached image. I want to be able to write a custom comment on every status change, if this would be necessary. VirtueMart has this option like in the image.

Thanks for your help !

- [ ![VM.png](/forum/attachment/20556) ](/forum/attachment/20556 "VM.png") [ ](/forum/attachment/20556?download=1 "VM.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg3MjYyNy1jdXN0b20tZW1haWxzLWJ5LW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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)
-

12 years 2 weeks ago [\#178540](#178540) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178540 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hi,

1. In your modification, please try to change the if condition from: Code:

if($data-&gt;cart-&gt;order_status == 'Warning'){

To: Code:

if($data-&gt;cart-&gt;order_status == 'warning'){

Same thing for "Created" put the "c" in lowercase.

2. We take in note that suggestion.

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 2 weeks ago [\#178675](#178675) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178675 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

1. this did not help ![:-(](/media/kunena/emoticons/22.png ":-(") Changing to the lower case did not put the text in my emails.
Any further ideas on what I should do ? Or where i should put my custom text so that it shows in the emails ??

2. This would be a real asset for HikaShop ![:-)](/media/kunena/emoticons/3.png ":-)")

Thanks.

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

12 years 2 weeks ago [\#178697](#178697) 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 *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178697 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hello,
A solution can be to test the value of the "$data-&gt;cart-&gt;order_status" variable, so you should use this line : Code:

echo '&lt;br/&gt; Order status : ' . $data-&gt;cart-&gt;order_status . '&lt;br/&gt;';

And test it again to see what's the value of that variable so that your can fix your code.

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 2 weeks ago -  12 years 2 weeks ago [\#178759](#178759) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178759 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Dear Mohamed,

I'm truely sorry, but I'm a real noob when it comes to php.
Where should I put this line to test this ?

Kind regards,
Joris

Last edit: 12 years 2 weeks ago by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile").

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

12 years 2 weeks ago [\#178769](#178769) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178769 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hi,

The best will be to paste it just before the line Code:

if($data-&gt;cart-&gt;order_status == 'warning'){

Like that Code:

echo '&lt;br/&gt; Order status : ' . $data-&gt;cart-&gt;order_status . '&lt;br/&gt;'; if($data-&gt;cart-&gt;order_status == 'warning'){

Regards,

---

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

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 2 weeks ago -  12 years 2 weeks ago [\#178825](#178825) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178825 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

hi All,

Testing like Jerome and Mohamed suggested had the following result :

"echo '
Order status : ' . $data-&gt;cart-&gt;order_status . '
'; "

Is now on top of the html mail I received.

See attachment...

Here is my full HTML code :
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.3.4 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;style type="text/css"&gt; body.hikashop_mail { background-color:#ffffff; color:#575757; } .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} div, p, a, li, td {-webkit-text-size-adjust:none;} @media (min-width:600px){ #hikashop_mail {width:600px !important;margin:auto !important;} .pict img {max-width:500px !important;height:auto !important;} } @media (max-width:330px){ #hikashop_mail{width:300px !important; margin:auto !important;} table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;} td[class="w49"] { width: 10px !important;} .pict img {max-width:278px; height:auto !important;} } @media (min-width:331px) and (max-width:480px){ #hikashop_mail{width:450px !important; margin:auto !important;} table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;} td[class="w49"] { width: 20px !important;} .pict img {max-width:408px; height:auto !important;} } h1{color:#1c8faf;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd; padding-bottom:10px;} h2{color:#89a9c1;font-size:14px;font-weight:bold;margin-top:20px;margin-bottom:5px;border-bottom:1px solid #d6d6d6;padding-bottom:4px;} a:visited{cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;} &lt;/style&gt; echo '&lt;br/&gt; Order status : ' . $data-&gt;cart-&gt;order_status . '&lt;br/&gt;'; &lt;?php if($data-&gt;cart-&gt;order_status == 'created'){ ?&gt; &lt;div id="hikashop_mail" style="font-family:Arial, Helvetica,sans-serif;font-size:12px;line-height:18px;width:100%;background-color:#ffffff;padding-bottom:20px;color:#5b5b5b;"&gt; &lt;div class="hikashop_online" style="font-family:Arial, Helvetica,sans-serif;font-size:11px;line-height:18px;color:#6a5c6b;text-decoration:none;margin:10px;text-align:center;"&gt; &lt;a style="cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;" href="{VAR:URL}"&gt; &lt;span class="hikashop_online" style="color:#6a5c6b;text-decoration:none;font-size:11px;margin-top:10px;margin-bottom:10px;text-align:center;"&gt; {TXT:MAIL_HEADER} &lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;table class="w600" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin:auto;background-color:#ebebeb;" border="0" cellspacing="0" cellpadding="0" width="600" align="center"&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="bottom"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}media/com_hikashop/images/mail/header.png" border="0" alt="" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w600" style="" width="600" align="center"&gt; &lt;table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td class="w560 pict" style="text-align:left; color:#575757" width="560"&gt; &lt;div id="title" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;img src="{VAR:LIVE_SITE}/media/com_hikashop/images/icons/icon-48-order.png" border="0" alt="" style="float:left;margin-right:4px;"/&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold; border-bottom:1px solid #ddd; padding-bottom:10px"&gt; {TXT:ORDER_TITLE} &lt;/h1&gt; &lt;h2 style="color:#1c8faf !important;font-size:12px;font-weight:bold; padding-bottom:10px"&gt; {TXT:ORDER_CHANGED} &lt;/h2&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td style="border:1px solid #adadad;background-color:#ffffff;"&gt; &lt;div class="w550" width="550" id="content" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin-left:5px;margin-right:5px;"&gt; &lt;h3 style="color:#393939 !important; font-size:14px; font-weight:normal; font-weight:bold;margin-bottom:0px;padding:0px;"&gt;{TXT:HI_CUSTOMER}&lt;/h3&gt; &lt;p&gt; {TXT:ORDER_BEGIN_MESSAGE} &lt;br /&gt; Uw reservatie werd goed ontvangen. &lt;/p&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt;&lt;td style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:BILLING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt;&lt;!--{IF:SHIPPING_ADDRESS}--&gt;&lt;td style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:SHIPPING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt;&lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt;&lt;td&gt;{VAR:BILLING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt;&lt;!--{IF:SHIPPING_ADDRESS}--&gt;&lt;td&gt;{VAR:SHIPPING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt;&lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;/table&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:SUMMARY_OF_YOUR_ORDER} &lt;/h1&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;margin-bottom:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_NAME}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{START:PRODUCT_LINE}--&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;"&gt; {LINEVAR:PRODUCT_IMG} {LINEVAR:PRODUCT_NAME}&lt;!--{IF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_CODE}&lt;!--{ENDIF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_DOWNLOAD} &lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:PRODUCT_LINE}--&gt; &lt;!--{START:ORDER_FOOTER}--&gt; &lt;tr&gt; &lt;td colspan="3" style="text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{LINEVAR:NAME}&lt;/td&gt; &lt;td style="text-align:right"&gt;{LINEVAR:VALUE}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:ORDER_FOOTER}--&gt; &lt;/table&gt; &lt;!--{IF:PAYMENT}--&gt; &lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PAYMENT_METHOD} :&lt;/span&gt; {VAR:PAYMENT} &lt;/p&gt; &lt;!--{ENDIF:PAYMENT}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:HIKASHOP_SHIPPING_METHOD} :&lt;/span&gt; {VAR:SHIPPING} &lt;/p&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;!--{IF:ORDER_SUMMARY}--&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:ADDITIONAL_INFORMATION} &lt;/h1&gt; &lt;p style="border-bottom:1px solid #ddd;padding-bottom:10px;"&gt; {VAR:ORDER_SUMMARY} &lt;/p&gt; &lt;!--{ENDIF:ORDER_SUMMARY}--&gt; &lt;p&gt; {TXT:ORDER_END_MESSAGE} &lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="top"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}/media/com_hikashop/images/mail/footer.png" border="0" alt="--" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php } ?&gt; echo '&lt;br/&gt; Order status : ' . $data-&gt;cart-&gt;order_status . '&lt;br/&gt;'; &lt;?php if($data-&gt;cart-&gt;order_status == 'reminder'){ ?&gt; &lt;div id="hikashop_mail" style="font-family:Arial, Helvetica,sans-serif;font-size:12px;line-height:18px;width:100%;background-color:#ffffff;padding-bottom:20px;color:#5b5b5b;"&gt; &lt;div class="hikashop_online" style="font-family:Arial, Helvetica,sans-serif;font-size:11px;line-height:18px;color:#6a5c6b;text-decoration:none;margin:10px;text-align:center;"&gt; &lt;a style="cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;" href="{VAR:URL}"&gt; &lt;span class="hikashop_online" style="color:#6a5c6b;text-decoration:none;font-size:11px;margin-top:10px;margin-bottom:10px;text-align:center;"&gt; {TXT:MAIL_HEADER} &lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;table class="w600" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin:auto;background-color:#ebebeb;" border="0" cellspacing="0" cellpadding="0" width="600" align="center"&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="bottom"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}media/com_hikashop/images/mail/header.png" border="0" alt="" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w600" style="" width="600" align="center"&gt; &lt;table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td class="w560 pict" style="text-align:left; color:#575757" width="560"&gt; &lt;div id="title" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;img src="{VAR:LIVE_SITE}/media/com_hikashop/images/icons/icon-48-order.png" border="0" alt="" style="float:left;margin-right:4px;"/&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold; border-bottom:1px solid #ddd; padding-bottom:10px"&gt; {TXT:ORDER_TITLE} &lt;/h1&gt; &lt;h2 style="color:#1c8faf !important;font-size:12px;font-weight:bold; padding-bottom:10px"&gt; {TXT:ORDER_CHANGED} &lt;/h2&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td style="border:1px solid #adadad;background-color:#ffffff;"&gt; &lt;div class="w550" width="550" id="content" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin-left:5px;margin-right:5px;"&gt; &lt;h3 style="color:#393939 !important; font-size:14px; font-weight:normal; font-weight:bold;margin-bottom:0px;padding:0px;"&gt;{TXT:HI_CUSTOMER}&lt;/h3&gt; &lt;p&gt;Beste, &lt;br /&gt;Wij mochten nog geen betaling ontvangen voor uw reservatie. &lt;br /&gt;Gelieve dit binnen de 3 werkdagen in orde te brengen, anders zijn wij genoodzaakt uw reservatie zonder verdere waarschuwing te annuleren.&lt;br /&gt;Mocht uw betaling deze herinnnering gekruisd hebben, mag u deze natuurlijk gewoon negeren. &lt;/p&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:SUMMARY_OF_YOUR_ORDER} &lt;/h1&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;margin-bottom:10px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_NAME}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{START:PRODUCT_LINE}--&gt; &lt;tr&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;"&gt; {LINEVAR:PRODUCT_IMG} {LINEVAR:PRODUCT_NAME}&lt;!--{IF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_CODE}&lt;!--{ENDIF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_DOWNLOAD} &lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_PRICE}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;{LINEVAR:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:PRODUCT_LINE}--&gt; &lt;!--{START:ORDER_FOOTER}--&gt; &lt;tr&gt; &lt;td colspan="3" style="text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{LINEVAR:NAME}&lt;/td&gt; &lt;td style="text-align:right"&gt;{LINEVAR:VALUE}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:ORDER_FOOTER}--&gt; &lt;/table&gt; &lt;!--{IF:PAYMENT}--&gt; &lt;!--&lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:PAYMENT_METHOD} :&lt;/span&gt; {VAR:PAYMENT} &lt;/p&gt; --&gt; &lt;!--{ENDIF:PAYMENT}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:HIKASHOP_SHIPPING_METHOD} :&lt;/span&gt; {VAR:SHIPPING} &lt;/p&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;!--{IF:ORDER_SUMMARY}--&gt; &lt;h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:ADDITIONAL_INFORMATION} &lt;/h1&gt; &lt;p style="border-bottom:1px solid #ddd;padding-bottom:10px;"&gt; {VAR:ORDER_SUMMARY} &lt;/p&gt; &lt;!--{ENDIF:ORDER_SUMMARY}--&gt; &lt;p&gt; {TXT:ORDER_END_MESSAGE} &lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr style="line-height: 0px;"&gt; &lt;td class="w600" style="line-height:0px" width="600" valign="top"&gt; &lt;img class="w600" src="{VAR:LIVE_SITE}/media/com_hikashop/images/mail/footer.png" border="0" alt="--" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php } ?&gt;

Thanks for your help !

- [ ![hika.png](/forum/attachment/20586) ](/forum/attachment/20586 "hika.png") [ ](/forum/attachment/20586?download=1 "hika.png")

Last edit: 12 years 2 weeks ago by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile").

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

12 years 2 weeks ago [\#178827](#178827) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#178827 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hi,

The php tags are not well placed. Code:

&lt;?php } ?&gt; echo '&lt;br/&gt; Order status : ' . $data-&gt;cart-&gt;order_status . '&lt;br/&gt;'; &lt;?php if($data-&gt;cart-&gt;order_status == 'reminder'){ ?&gt;

should be Code:

&lt;?php } echo '&lt;br/&gt; Order status : ' . $data-&gt;cart-&gt;order_status . '&lt;br/&gt;'; if($data-&gt;cart-&gt;order_status == 'reminder'){ ?&gt;

Regards,

---

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

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 2 weeks ago [\#179030](#179030) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#179030 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

I've removed the brackets ' } ' from the code above so my code looks like this :
Code:

&lt;?php echo '&lt;br/&gt; Order status : ' . $data-&gt;cart-&gt;order_status . '&lt;br/&gt;'; if($data-&gt;cart-&gt;order_status == 'warning') ?&gt;

And now it works : I get the order status in my emails.
Also, (and this was already before) the topic of the email has the correct status.

Unfortunately, I do not get any of the altered html in the email.

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

12 years 2 weeks ago [\#179230](#179230) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#179230 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hi,

> Unfortunately, I do not get any of the altered html in the email.

Can you please clarify it ?

If you got the order status displayed, you can verify that this status is the same than in your PHP code.
After that, there is no open embrace in your code, so I don't know what you want to display if you do not have something "inside" your "if".

Regards,

---

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

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

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

Less More

- Posts: 72
- Thank you received: 2
-
-
- [](http://www.ijsbaanleuven.be)
-

12 years 1 week ago -  12 years 1 week ago [\#180054](#180054) by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")  Replied by *[ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#180054 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Hi all,

I'm half way there ![:-)](/media/kunena/emoticons/3.png ":-)")

I've had a look at W3 schools on php and been trying, changed the code to this :
Code:

&lt;?php if($data-&gt;cart-&gt;order_status == 'created') { echo "Text Created"; } elseif($data-&gt;cart-&gt;order_status == 'confirmed') { echo "Text Confirmed"; } elseif($data-&gt;cart-&gt;order_status == 'cancelled') { echo "Text Cancelled"; } elseif($data-&gt;cart-&gt;order_status == 'refunded') { echo "Text Refunded"; } elseif($data-&gt;cart-&gt;order_status == 'shipped') { echo "Text Shipped"; } elseif($data-&gt;cart-&gt;order_status == 'warning') { echo "Text Warning"; } elseif($data-&gt;cart-&gt;order_status == 'cancelled') {echo "Text Cancelled"; } elseif($data-&gt;cart-&gt;order_status == 'reminder') {echo "Text Reminder"; } ?&gt;

Now it works ! Only one funny thing witch makes it useless ![:(](/media/kunena/emoticons/22.png ":(") :
If I change the status of the order to "reminder", I get the text for created. If I set the status to confirmed, I get created, and so on. So it seems like I get the one that comes before the status I need. In all the emails, the subject has the correct status, only the text is wrong.

Any tips ?

Thanks !

Last edit: 12 years 1 week ago by [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL29yZGVycy1tYW5hZ2VtZW50Lzg3MjYyNy1jdXN0b20tZW1haWxzLWJ5LW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) 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: 14325
-
-

12 years 1 week ago [\#180089](#180089) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom emails by Order Status](/forum/35-orders-management/872627-custom-emails-by-order-status#180089 "-- HikaShop version -- : 2.x -- Joomla version -- : 3.x  We have a client who would like to have pre-configured custom emails by order status, so that the email someone gets when the status is changed to &quot;Partial Backorder&quot; would be different content than the email when the status is changed to &quot;Ready for Pickup&quot;, etc.  Is there an easy way to achieve this in HikaShop, or will we need to develop a custom plugin using the onAfterOrderUpdate(&amp;$order,&amp;$send&#95;email) trigger to add the custom text that goes with each order status? It looks like it will require custom development because the status update email used is the same for all statuses, but maybe we missed a cool trick of how to do this.  Or of course maybe our client will be lucky and you already have this type of feature in development? :)")*

Try to use $data-&gt;order_status instead of $data-&gt;cart-&gt;order_status in your code and that should hopefully help.

The following user(s) said Thank You: [ijsbaanleuven](/forum/user/34667-ijsbaanleuven "View ijsbaanleuven's Profile")

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

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