add coupon code to admin notification

  • Posts: 109
  • Thank you received: 2
  • Hikashop Multisite
9 years 1 month ago #217473

-- 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.

<!--{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?

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 1 month ago #217519

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

$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:
$cartFooters[] = array(
	'NAME' => JText::_('HIKASHOP_COUPON') . ' - ' . @$data->order->order_discount_code,
	'VALUE' => $t
);

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 9 years 1 month ago by Jerome. Reason: remove some ident

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

  • Posts: 109
  • Thank you received: 2
  • Hikashop Multisite
9 years 1 month ago #217550

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.

$cartFooters[] = array(
	'NAME' => JText::_('HIKASHOP_COUPON') . ' - ' . @$data->order_discount_code, 
	'VALUE' => $t 
);

Last edit: 9 years 1 month 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.059 seconds
Powered by Kunena Forum