Skip to main content

[SOLVED] How to Show the COUPON CODE USED on the Notification Emails?

More
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.
Last edit: 9 years 1 month ago by MSTACE.

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

More
9 years 1 month ago #275672 by nicolas
Hi,

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.

More
9 years 1 month ago #275718 by MSTACE
Thank you!

That works great.

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

More
9 years 1 month ago - 9 years 1 month ago #275722 by MSTACE
Is it possible to add the IF/ENDIF statement for Coupons in this HTML?

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.

More
9 years 1 month ago #275727 by nicolas
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:
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.

More
9 years 1 month ago #275782 by MSTACE
Yes, excellent. This is working great.

Thank you.

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

Time to create page: 0.207 seconds
Powered by Kunena Forum