Developer forum

Forum » Dynamicweb 10 » Voucher Renderer App

Voucher Renderer App

Joseph Vause
Reply

Hello,

There doesn't seem to be any documentation on how to actually write a template for the Voucher Renderer App? and I cant find any examples in Swift. Does anyone have an example that can be used? Also where does it need to live, I have added a file here Files/Templates/Designs/Swift/eCom/Voucher/voucherMail.cshtml but it doesnt show up in the template selector

Thanks


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Joseph

Yes, you are right - and in DW10 we have have a task to make it possible to see where the template should be located (in DW9 the template selector shows the path location on hover).

Templates for this module has to be placed in /Templates/eCom/Vouchers - so you almost guessed right.

There is only one tag for that template: @GetString("Ecom:ContextVoucherTemplate.VoucherCode") will give you the voucher code

 

Votes for this answer: 1
 
Joseph Vause
Reply

Hi Nicolai,

Thank you for your quick response, that works great, I can see you can set the theme on a Voucher Renderer App, but the theme tag isn't available in the available values in that template

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Joseph

I think the theme selector is part of the item type for all apps - and you can use it in templates like we do it on emails - but that is probably a bigger task. I think styling the template directly is the fastest.

BR Nicolai

 

You must be logged in to post in the forum