How to customize email according to order status?

  • Posts: 3
  • Thank you received: 0
8 years 10 months ago #226235

Hi, i would like to customize my email when i update the order status to notify customer.
I would want to remove the summary of order for only certain order status that i created my own. (refer to my attachment for clearer picture). I am aware that i am required to do some editing in the php file, however i am not so sure of coding.
Could you please help me? Thank you so much!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
8 years 10 months ago #226293

Hi,

You can add the following php if condition:

<?php if(!in_array($data->order->order_status,array('X','Y'))){ ?>
Around the code:
<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
	{TXT:SUMMARY_OF_YOUR_ORDER}
</h1>
<!--{START:VENDOR_LINE}-->
<!--{IF:VENDOR_CONTENT}-->{VAR:VENDOR_CONTENT}<!--{ENDIF:VENDOR_CONTENT}-->
<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;">
	<tr>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:left;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_NAME}</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_PRICE}</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_QUANTITY}</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PRODUCT_TOTAL}</td>
	</tr>
<!--{START:PRODUCT_LINE}-->
	<tr>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;">
			{LINEVAR:PRODUCT_IMG}
			{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->
			{LINEVAR:PRODUCT_DOWNLOAD}
			{LINEVAR:PRODUCT_DETAILS}
		</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTITY}</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td>
	</tr>
<!--{END:PRODUCT_LINE}-->
<!--{START:ORDER_FOOTER}-->
	<tr>
		<td colspan="3" style="text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{LINEVAR:NAME}</td>
		<td style="text-align:right">{LINEVAR:VALUE}</td>
	</tr>
<!--{END:ORDER_FOOTER}-->
</table>
<!--{END:VENDOR_LINE}-->
Don't forget to add:
<?php } ?>
Right after this code, else it will return an error.

In the given code, you have to replace the "X" and the "Y" by the order status for which you don't want to see the summary.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
8 years 10 months ago #226393

Thank you so much xavier! I really appreciate it :)
Which file should i put this line of code into? I'm using hikashop version 2.6, joomla version 2.5

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
8 years 10 months ago #226430

Hi,

You can do that in the HTML version of the email that you'll find when you edit the email via the menu System>Emails (Business edition only).

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
8 years 10 months ago #226711

Hi, I am using the starter pack.
Would really hoping for it to work. Is there any way i can implement it into the codes? I want to adjust the template of the order status email. I am hoping to get the template follows the order status each time when i update the order status.
Please help me with this.

Thank you :D

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 10 months ago #226735

Hi,

We already gave you some code and we already told you that the email edition is provided by HikaShop Business.
I am sorry but our support won't be able to help you further for your request.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum