Message tokens - need to add product name in gift card message template

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 年 前
Ii have a store that only sells gift cards for treatments, so every order that is put through is either for an e-voucher (so the gift card notification message template is sent out) or a physical voucher which is posted from the shop manually.

I want the e-voucher version to put the name of the treatment and the short description on the e-voucher, but using %Product.Name% and %Product.ShortDescription% message tokens doesn't work.

How can I fix this and get it working as I need it to?

Thanks!
7 年 前
Hi,

just add the following lines to the SendGiftCardNotification method of the WorkflowMessageService service:

if (giftCard.PurchasedWithOrderItem != null)
   _messageTokenProvider.AddProductTokens(tokens, giftCard.PurchasedWithOrderItem.Product, languageId);
7 年 前
Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.