Custom entry in E-mails on order change

  • Posts: 139
  • Thank you received: 1
10 years 4 months ago #162202

I am wanting to add another field in the dictionary called
CUSTOMMESSAGE="My custom message"

I want this message to be displayed in the email that is sent out when the order status is changed to "Confirmed"

How do I go about this?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 4 months ago #162215

Hi,

The simplest is to directly write your text in the order status notification email template that you can edit in the HTML version area of the email via the menu System>Emails.
And if you want to use translations, then you want to add instead such code in there:
<?php echo JText::_('CUSTOMMESSAGE'); ?>
and then add your translation line to the override area of your HikaShop translation file via the Languages tab of the HikaShop configuration.

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

  • Posts: 139
  • Thank you received: 1
10 years 4 months ago #162335

Ok, just one more question on this part. I am only wanting this custom message to display when the Purchase status changes to "confirmed"

What would the PHP if statement look like? I have looked at the code but seem to be missing the part that deals with the status.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #162337

Hello,
The solution will be to use some php code like :

<?php 
if ($data->oder_status == 'YOUR_STATUS' )echo JText::_('CUSTOMMESSAGE'); 
?>

Note that you'll have to replace the "YOUR_STATUS" string by the order status.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum