email-templates
email-templates copied to clipboard
Math operations in Dynamic Email
Hi I'm very new to sendgrid's dynamic template and saw some samples that it is possible to use handlebars, my question is how do I do mathematical operations?
I have a list of Items that I need to add Quantity and Price to get the total price for each Item and I can't seem to find a way on how to do it. I saw some Helpers but I'm not sure how to actually implement and it where to put it.
Handlebars.registerHelper("multiply", function(a, b){
return (a * b);
});
I would also like to know if this is possible, a simple {{divide 100 variable}} would do it. But it does not seem to work
I don't think this is possible with Sendgrid. It is possible in handlebars on other platforms though.
:( So sad