- Posts: 293
- Thank you received: 9
Displaying the DISCOUNT CODE on All Order Emails
4 years 1 month ago - 4 years 1 month ago #343673
by MSTACE
Displaying the DISCOUNT CODE on All Order Emails was created by MSTACE
-- url of the page with the problem -- :
www.notable.au/new/
-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.1.5
-- PHP version -- : 8.0.21
I used to use this code to display the DISCOUNT CODE on all of the order emails:
However, with Joomla 4, this is no longer working and actually stops the "Order administrator notification" email from being sent.
Any ideas?
Thank you.
-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.1.5
-- PHP version -- : 8.0.21
I used to use this code to display the DISCOUNT CODE on all of the order emails:
Code:
<!--{IF:DISCOUNT}-->
<p>
<span style="color:#1c8faf !important;font-weight:bold;">COUPON used :</span> {VAR:order.order_discount_code}
</p>
<!--{ENDIF:DISCOUNT}-->
However, with Joomla 4, this is no longer working and actually stops the "Order administrator notification" email from being sent.
Any ideas?
Thank you.
Last edit: 4 years 1 month ago by MSTACE.
Please Log in or Create an account to join the conversation.
4 years 1 month ago #343677
by nicolas
Replied by nicolas on topic Displaying the DISCOUNT CODE on All Order Emails
Hi,
There is no
available in the HikaShop emails by default.
So you must have also added some code in the "preload" of the email to add this.
So either you're missing that code from the preload, or the code you added in the preload has a problem, not the tag in the HTML.
There is no
Code:
<!--{IF:DISCOUNT}--> ... <!--{ENDIF:DISCOUNT}-->
So you must have also added some code in the "preload" of the email to add this.
So either you're missing that code from the preload, or the code you added in the preload has a problem, not the tag in the HTML.
Please Log in or Create an account to join the conversation.
4 years 1 month ago - 4 years 1 month ago #343678
by MSTACE
Replied by MSTACE on topic Displaying the DISCOUNT CODE on All Order Emails
Sorry, here is the original code that you all gave me years ago.
This one is not working either.
This one is not working either.
Code:
<!--{IF:DISCOUNT}-->
<?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
}
?>
<!--{ENDIF:DISCOUNT}-->
Last edit: 4 years 1 month ago by MSTACE.
Please Log in or Create an account to join the conversation.
4 years 1 month ago #343692
by Philip
Replied by Philip on topic Displaying the DISCOUNT CODE on All Order Emails
Hello,
Sorry for this returns, but in order to be sure, can you precise from which parts did you add this custom code (shown here).
In the HTML, TEXT or preload version ?
Did you just update your Joomla 4 version ? Or the HikaShop version too ?
Awaiting your returns to progress on your issue.
Regards
Sorry for this returns, but in order to be sure, can you precise from which parts did you add this custom code (shown here).
In the HTML, TEXT or preload version ?
Did you just update your Joomla 4 version ? Or the HikaShop version too ?
Awaiting your returns to progress on your issue.
Regards
Please Log in or Create an account to join the conversation.
4 years 1 month ago #343750
by MSTACE
Replied by MSTACE on topic Displaying the DISCOUNT CODE on All Order Emails
I added this code to the HTML version.
This was a new Joomla 4 install.
This was a new Joomla 4 install.
Please Log in or Create an account to join the conversation.
4 years 1 month ago #343763
by nicolas
Replied by nicolas on topic Displaying the DISCOUNT CODE on All Order Emails
Hi,
This code should work for the order creation notification and the order admin notification:
This should work for the order status notification and the payment notification emails:
The second code might also work for the order creation notification and the order admin notification but it would require some testing to verify that.
This code should work for the order creation notification and the order admin notification:
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($data->cart->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.
4 years 1 month ago #343775
by MSTACE
Replied by MSTACE on topic Displaying the DISCOUNT CODE on All Order Emails
Excellent. These work great.
Thank you very much.
Thank you very much.
Please Log in or Create an account to join the conversation.
Time to create page: 0.233 seconds