Send An Email When Product Status Is Updated

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
2 years 8 months ago #334854

-- HikaShop version -- : 4.4.3

Hi

My customer has asked if it it possible to send an email when the status of a product is updated. Currently there is an ETA custom field so that his customers know the estimated time for delivery is. These are shown in the emails currently sent out after the order is placed and on the sites product pages.

So would it be fairly straightforward to create an email based on the existing emails by status in the Hikashop system by possibly creating a new status ETA and then using the actions button on the orders. So in this case I would use the following tag {LINEVAR:TABLE.XXX} replacing xxx with eta which is the column name as part of the email?

Thanks

David

PS: Sorry I have just realised I have posted this in the wrong section

Last edit: 2 years 8 months ago by davec.

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
2 years 8 months ago #334855

Hi,

By "Currently there is an ETA custom field" I suppose that you mean that you have a custom item field that you fill with the ETA for each product in each order in the backend.
A custom item field can be displayed automatically below the product name in the "order status notification" (sent when the status of an order is changed), or the "order notification" (sent when you use the "email" button of an order.
So supposing that the email display settings of the custom field are activated (menu Display>Custom fields), that information can be added to the emails automatically without changing any code or doing any customization. It will actually be displayed by the tag {LINEVAR:PRODUCT_DETAILS} in the HTML version.
Now, you can indeed use the {LINEVAR:item.eta} tag to display it without letting the system display it for you, but it has to be displayed between the <!--{START:PRODUCT_LINE}--> and <!--{END:PRODUCT_LINE}--> tags of the HTML version of the email.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
2 years 8 months ago #334938

Hi Nicolas

thanks for the reply. So I can configure it like the following at the start of the product line if it needs to be at the top?

<!--{START:PRODUCT_LINE}-->
<tr><td colspan="4"><b>You Have A NEW ETA:</b> <span style="font-size:20px;">{LINEVAR:item.eta}</span></td></tr>
	<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>
		{LINEVAR:CUSTOMFIELD_VALUE}
		<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}-->

Thanks

David

Last edit: 2 years 8 months ago by davec.

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
2 years 8 months ago #334940

Hi,

Yes, you can add it like that.

The following user(s) said Thank You: davec

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

Time to create page: 0.056 seconds
Powered by Kunena Forum