- Posts: 293
- Thank you received: 9
[SOLVED] How to Show the COUPON CODE USED on the INVOICE?
9 years 2 weeks ago - 9 years 2 weeks ago #278298
by MSTACE
[SOLVED] How to Show the COUPON CODE USED on the INVOICE? was created by MSTACE
-- HikaShop version -- : 3.1.1
This code works perfectly for adding the COUPON CODE to the order emails:
But it does not work for adding the COUPON CODE to the INVOICE (order / invoice.php).
What code would work in this case?
Thank you.
This code works perfectly for adding the COUPON CODE to the order emails:
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
}
?>
But it does not work for adding the COUPON CODE to the INVOICE (order / invoice.php).
What code would work in this case?
Thank you.
Last edit: 9 years 2 weeks ago by MSTACE.
Please Log in or Create an account to join the conversation.
9 years 2 weeks ago #278328
by nicolas
Replied by nicolas on topic How to Show the COUPON CODE USED on the INVOICE?
Hi,
The tags system is only in the emails.
For view overrides you need to use PHP code instead.
So instead of:
You can use:
The tags system is only in the emails.
For view overrides you need to use PHP code instead.
So instead of:
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
}
?>
Code:
<?php
if(!empty($this->element->order_discount_code)){ ?>
<p>
<span style="color:#1c8faf !important;font-weight:bold;">COUPON used :</span> <?php echo $this->element->order_discount_code; ?>
</p>
<?php
}
?>
Please Log in or Create an account to join the conversation.
9 years 2 weeks ago #278393
by MSTACE
Replied by MSTACE on topic How to Show the COUPON CODE USED on the INVOICE?
That works great!
Thank you.
You might think about adding the Coupon Code Used on the email and invoice templates.
The retailers are asking to know which Coupon Code was used and the customers like to know that the Coupon Code was applied.
Thank you.
You might think about adding the Coupon Code Used on the email and invoice templates.
The retailers are asking to know which Coupon Code was used and the customers like to know that the Coupon Code was applied.
The following user(s) said Thank You: Philip
Please Log in or Create an account to join the conversation.
Time to create page: 0.179 seconds