- Posts: 293
- Thank you received: 9
[SOLVED] How to Show the COUPON CODE USED on the Notification Emails?
9 years 1 month ago - 9 years 1 month ago #275661
by MSTACE
-- HikaShop version -- : 3.1.1
How can I show which COUPON CODE was used by the customer on the Notification Emails?
This is especially important for the Order administrator notification so the retailer can see which code was used.
Thank you.
How can I show which COUPON CODE was used by the customer on the Notification Emails?
This is especially important for the Order administrator notification so the retailer can see which code was used.
Thank you.
Last edit: 9 years 1 month ago by MSTACE.
Please Log in or Create an account to join the conversation.
9 years 1 month ago #275672
by nicolas
Replied by nicolas on topic How to Show the COUPON CODE USED on the Notification Emails?
Hi,
You can use such tag in the HTML version of the email: {VAR:order.order_discount_code}
You can use such tag in the HTML version of the email: {VAR:order.order_discount_code}
Please Log in or Create an account to join the conversation.
9 years 1 month ago #275718
by MSTACE
Replied by MSTACE on topic How to Show the COUPON CODE USED on the Notification Emails?
Thank you!
That works great.
That works great.
Please Log in or Create an account to join the conversation.
9 years 1 month ago - 9 years 1 month ago #275722
by MSTACE
Replied by MSTACE on topic How to Show the COUPON CODE USED on the Notification Emails?
Is it possible to add the IF/ENDIF statement for Coupons in this HTML?
Something like:
I have tried various words, but they don't seem to work: IF:DISCOUNT, IF:COUPON, etc...
Something like:
Code:
<!--{IF:DISCOUNT_CODE}-->
<p>
<span style="color:#1c8faf !important;font-weight:bold;">COUPON USED :</span> {VAR:order.order_discount_code}
</p>
<!--{ENDIF:DISCOUNT_CODE}-->
I have tried various words, but they don't seem to work: IF:DISCOUNT, IF:COUPON, etc...
Last edit: 9 years 1 month ago by MSTACE.
Please Log in or Create an account to join the conversation.
9 years 1 month ago #275727
by nicolas
Replied by nicolas on topic How to Show the COUPON CODE USED on the Notification Emails?
Hi,
To use a IF /ENDIF tag, you need to first have a variable defined with it in the preload.
So the simplest would be to use standard PHP:
To use a IF /ENDIF tag, you need to first have a variable defined with it in the preload.
So the simplest would be to use standard PHP:
Code:
<?php
if(!empty($data->order_discount_code)){ ?>
<p>
<span style="color:#1c8faf !important;font-weight:bold;">COUPON USED :</span> {VAR:order.order_discount_code}
</p>
<?php
}
?>
Please Log in or Create an account to join the conversation.
9 years 1 month ago #275782
by MSTACE
Replied by MSTACE on topic How to Show the COUPON CODE USED on the Notification Emails?
Yes, excellent. This is working great.
Thank you.
Thank you.
Please Log in or Create an account to join the conversation.
Time to create page: 0.207 seconds