Skip to main content

Put coupon name in notification email?

12 years 8 months ago #150040 by Tahiera
Latest Hikashop Business version...

What code can I add to the admin notification email to insert the name of the coupon used for an order?

For example, now it shows:

Coupon: -$7.00


And I want it to show:

Coupon (COUPON NAME): -$7.00


Thanks for your help as always.

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

12 years 7 months ago #150271 by Mohamed Thelji
Hi,
The solution will probably be to edit the Preload version code of your "Order administrator notification" email through "Hikashop->System->Emails" and change that lines :
Code:
$cartFooters[] = array( 'NAME' => JText::_('HIKASHOP_COUPON'), 'VALUE' => $t );
By :
Code:
if(isset($data->cart->order_discount_code)) $coupon_name = JText::_('HIKASHOP_COUPON') . ' ('. $data->cart->order_discount_code . ')'; else $coupon_name = JText::_('HIKASHOP_COUPON'); $cartFooters[] = array( 'NAME' => $coupon_name, 'VALUE' => $t );

Note that the "Emails" section is only available through the business version of Hikashop

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

11 years 5 days ago #221678 by adil.houssam
ça marche pas !

il va écrire toujours Coupon: -$7.00

$coupon_name = JText::_('HIKASHOP_COUPON');

JText::_('HIKASHOP_COUPON'); = "Coupon";

alors rien n'a changer ?

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

11 years 4 days ago #221679 by Jerome
Hi,

The code that Mohamed gave is working fine.
Please, write in English in an English thread or if you do not want to write in English ; please create a new French thread in the French section of the forum.

Regards,

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

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

11 years 4 days ago #221734 by adil.houssam
oups, sorry

I found the solution :

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

sorry for my english is not so good

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

Time to create page: 0.061 seconds
Powered by Kunena Forum