Skip to main content

add coupon code to admin notification

More
10 years 11 months ago #217473 by fullfusion
-- url of the page with the problem -- : blynd.com
-- HikaShop version -- : 2.5.0 business
-- Joomla version -- : 3.4.4

Hello,

I found your answer on how to do close to what I'm looking for here. www.hikashop.com/forum/orders-management...ification-email.html In fact the medean asked exactly what I want to do, but never got the full answer. How can I get the coupon code to display next to coupon title? See attachment.

Looking in the email code I'm seeing the following code that generates the Subtotal, Coupon, and Total pieces.
Code:
<!--{START:ORDER_FOOTER}--> <tr> <td colspan="3" style="text-align:right;color:#1c8faf !important;font-size:12px;font-weight:bold;">{LINEVAR:NAME}</td> <td style="text-align:right">{LINEVAR:VALUE}</td> </tr> <!--{END:ORDER_FOOTER}-->

How can what I'm looking to do be done?

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

More
10 years 11 months ago - 10 years 11 months ago #217519 by Jerome
Hi,

The HTML code you pasted in the content part of the email.
The tag allows to repeat a specific block for each element for the order "footer".

The content of that order footer is generated in the "preload" of the email (the last textarea when you edit an email).
For the coupon, you can search for that code
Code:
$cartFooters[] = array( 'NAME' => JText::_('HIKASHOP_COUPON'), 'VALUE' => $t );
If you want to add the coupon code in the label, you need to modify it into:
Code:
$cartFooters[] = array( 'NAME' => JText::_('HIKASHOP_COUPON') . ' - ' . @$data->order->order_discount_code, 'VALUE' => $t );

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 10 years 11 months ago by Jerome. Reason: remove some ident

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

More
10 years 11 months ago - 10 years 11 months ago #217550 by fullfusion
Awesome! Thank you, Jerome! I found that code in the pre-load version of the email. Thank you for the instruction.

In case someone else needs this in the future, I had to make one adjustment to the code you provided. You had and extra "->order" in there. It works with this code.
Code:
$cartFooters[] = array( 'NAME' => JText::_('HIKASHOP_COUPON') . ' - ' . @$data->order_discount_code, 'VALUE' => $t );
Last edit: 10 years 11 months ago by fullfusion.
The following user(s) said Thank You: Jerome

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

Time to create page: 0.194 seconds
Powered by Kunena Forum